Académique Documents
Professionnel Documents
Culture Documents
NO: 1
AIM:
To create a document and manipulate the text with specific notations using MS-office.
RESUME
Raghul. V
4/10, Nehru Street, Salem-10.
OBJECTIVE:
To obtain a meaningful and challenging position which will enables me to become a
recognized employee, face the challenges, serve the industry with all my might and to learn and
acquire more practical knowledge.
EDUCATIONAL QUALIFICATION:
SOFTWARE SKILLS:
LANGUAGES: C, C++, JAVA.
PACKAGES: MS-Office
AREA OF INTEREST:
PERSONAL DETAILS:
NAME
: Raghul.V
FATHERS NAME
: Vishnu.R
DATE OF BIRTH
: 06-03-1988
DECLARATION
I hereby declare that the above details are true to the best of my knowledge.
Yours
Raghul.V
RESULT:
Thus, the given document has been created and manipulated using MS-office.
EX.NO:02
AIM:
To prepare the Line, XY, Bar and Pie Charts in MS-Excel.
Create examination databases and find the total and average of each student.
RULES:
1. PASS if marks in each subject >= 35.
2. FAIL if marks in any subject < 35.
3. Distinction if average >= 75.
4. First class if average >= 60 but less than 75.
5. Second class if average >= 50 but less than 60.
6. Third class if average >= 35 but less than 50.
PROCEDURE:
1. Enter the given data in worksheet.
2. Choose the chart option from the insert menu, or choose the chart wizard button from the
standard toolbar.
3. Shows the chart wizard step 1 of 4 chart type dialog box.
4. Choose the appropriate chart type from the chart type list box then click next.
5. Shows the chart wizard step 2 of 4 chart source data dialog box, then click next.
6. Shows the chart wizard step 3 of 4 chart options dialog box, here you can give the
Chart title. (i) X and Y axis title etc., then click next.
7. Shows the chart wizard step 4 of 4 chart location dialog box then click finish.
RESULT:
Thus, the various charts has been created successfully.
EX.NO: 3
AIM:
To draw a flowchart using drawing toolbar in MS-WORD.
PROCEDURE:
Procedure:
1. To create a document , select File menu bar then choose New option
2. Choose the flowchart option in the auto shapes menu from the drawing tool bar
3. Select the flowchart symbols from auto shapes
Start / Terminate
Input
Process
Loop / Preparation
Decision
Connector
4. After finishing the entire flowchart select all the flowchart symbols and arrows right click and
click Grouping.
5. Save the document
SAMPLE FLOWCHART
RESULT:
Thus, the given flowchart has been drawn successfully.
PROGRAM:
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int a;
float b;
char c='U';
char d[10];
clrscr();
printf(\nENTER THE VALUE OF a,b,c\n);
printf(\n\n a=);
scanf(%d,&a);
printf(\n\n b=);
scanf(%f,&b);
printf("\nEnter character string\n");
printf(\n\nc=);
scanf("%s",d);
printf(\n\n sizeof(%d)=%d bytes,a,sizeof(a));
printf(\n\n sizeof(%f)=%d bytes,b,sizeof(b));
printf(\n\n sizeof(%c)=%d bytes,c,sizeof(c));
printf("\n\n sizeof('c')=%d bytes",sizeof('c'));
printf("\n\n sizeof(%s)=%d bytes",d,sizeof(d));
getch();
}
OUTPUT:
ENTER THE VALUE OF a, b, c
a=20
b=10
Enter character string
c=WELCOME
sizeof(10)=2 bytes
sizeof(20.000000)=4 bytes
sizeof(u)=1 bytes
sizeof(c)=2 bytes
sizeof(WELCOME)=20 bytes
EX. NO: 4b
EXPRESSION EVALUATION
AIM:
To Write a C program to evaluate the given expression r = a * (b c) / d + e.
ALGORITHM:
Step-1: Start the program
Step-2: Declare the necessary variables.
Step-3: Compute the given expression r = a * (b c) / d + e.
Step-4: Print the result
Step-5: Stop the program.
PROGRAM:
#include <stdio.h>
#include <conio.h>
void main()
{
float a,b,c,d,e,r;
clrscr();
printf("\n\n Enter the values of a,b,c,d,e\n\n");
scanf("%f %f %f %f %f",&a,&b,&c,&d,&e);
printf("\n\na = %.2f\n",a);
printf("\n\nb = %.2f\n",b);
printf("\n\nc = %.2f\n",c);
printf("\n\nd = %.2f\n",d);
printf("\n\ne = %.2f\n",e);
printf("\n\na * (b - c) / d + e\n\n");
r = a * (b - c) / d + e;
printf("\n%.2f * (%.2f - %.2f) / %.2f + %.2f = %.2f",a,b,c,d,e,r);
getch();
}
OUTPUT:
EX.NO: 4C
CONDTIONAL STATEMENT
AIM:
To write a C program to check the largest number among given three numbers.
ALGORITHM:
STEP-1: Start the program.
STEP-2: Declare the necessary variables.
STEP-3: CHECK IF ((a > b && a > c)
STEP-3.1: Print A.
STEP-4: Otherwise, check if(b>c)
STEP-4.1: Print B
STEP-5: else print C
STEP-6: Stop.
PROGRAM:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("\nEnter any three numbers : ");
scanf("%d %d %d", &a, &b, &c );
if(a > b && a > c)
printf("\n\n %d is the largest number\n",a);
else if(b > c)
printf("\n\n %d is the largest number\n",b);
else
printf("\n\n %d is the largest number\n",c);
getch();
}
OUTPUT:
OUTPUT:1
Enter any three numbers : 10 15 60
60 is the largest number
OUTPUT:2
Enter any three numbers : 20 5 4
20 is the largest number
OUTPUT:3
Enter any three numbers : 20 50 26
50 is the largest number
RESULT:
Thus, the Data type, Expression Evaluation, Conditional Statements has been executed
successfully.
EX. NO: 5
AIM:
To write a C program to solve scientific problem using decision making and looping.
ALGORITHM:
Start 1: start the program.
Start 2: get the a, b, c values.
Start 3: if a=0 means print error.
Start 4: perform calculation for e=b*b-4*a*c
If e>0 means d=sqrt(e);
Then x1= (-b+d) / (2*a);
X2= (-b-d) / (2*a);
Print the x1, x2 values.
Start 5: else d=sqrt(-e) then
X1=(-b/ 2*a)
X2=d/(2*a)
Start 6: print the x1, x2 values.
Start 7: stop the program.
PROGRAM:
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main()
{
double a, b, c, d, e, x1, x2;
/* Read input data */
printf("\na = ");
scanf("%lf", &a);
printf("b = ");
scanf("%lf", &b);
printf("c = ");
scanf("%lf", &c);
/* Test for a = 0. */
if (a == 0.)
{
printf("\nError: a = 0.\n");
exit(1);
}
/* Perform calculation */
e = b * b - 4. * a * c;
if (e > 0.) // Test for real roots
{
/* Case of real roots */
d = sqrt(e);
x1 = (-b + d) / (2. * a);
x2 = (-b - d) / (2. * a);
printf("\nx1 = %12.3e x2 = %12.3e\n", x1, x2);
}
else
{
/* Case of complex roots */
d = sqrt(-e);
x1 = -b / (2. * a);
x2 = d / (2. * a);
printf("\nx1 = (%12.3e, %12.3e) x2 = (%12.3e, %12.3e)\n",
x1, x2, x1, -x2);
}
return 0;
}
OUTPUT:
a=4
b=2
c=5
x1 = ( -2.500e-01, 1.090e+00) x2 = ( -2.500e-01, -1.090e+00)
RESULT:
Thus, the Scientific problem solving using decision making and looping has been executed
successfully.
EX. NO: 6A
AIM:
To write a C program to implement the one dimensional array.
ALGORITHM:
FLOW CHART:
PROGRAM:
#include <stdio.h>
#include <conio.h>
void main()
{
int a[3], i;;
clrscr();
printf("\n\t Enter three numbers : ");
for(i=0; i<3; i++)
{
scanf("%d", &a[i]); // read array
}
printf("\n\n\t Numbers are : ");
for(i=0; i<3; i++)
{
printf("\t %d", a[i]); // print array
}
getch();
}
OUTPUT:
EX. NO: 6B
AIM:
To write a C program to implement the Matrix multiplication.
ALGORITHM:
PROGRAM:
#include<stdio.h>
#include<conio.h>
void main()
{
int a[3][3],b[3][3],c[3][3],i,j,k;
clrscr();
printf("\nENTER 'A'MATRIX\n");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
scanf("%d",&a[i][j]);
}
printf("\n");
}
printf("\nENTER 'B'MATRIX\n");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
scanf("%d",&b[i][j]);
}
printf("\n");
}
printf("__________________________\n\n");
printf("MATRIX MULTIPLICATION\n");
printf("__________________________\n\n");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
c[i][j]=0;
for(k=0;k<3;k++)
{
c[i][j]=c[i][j]+a[i][k]*b[k][j];
}
}
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
printf("%d\t",c[i][j]);
}
printf("\n\n");
}
getch();
}
OUTPUT:
ENTER 'A'MATRIX
111
222
333
ENTER 'B'MATRIX
123
123
123
__________________________
MATRIX MULTIPLICATION
__________________________
369
6 12 18
9 18 27
RESULT:
Thus, the given program has been executed successfully.
Ex.No.7a
AIM:
To write a C program to compare two strings using strcmp().
ALGORITHM:
PROGRAM:
OUTPUT:
Ex.No.7b
AIM:
To write a C program to concatenate two strings using strcat()
ALGORITHM:
Start 1: start the progrm.
Start 2: get the first string.
Start 3: get the second string.
Satrt 4: using strcat() function to concatenate the string.
Start 5: print the concatenated string.
Start 5: stop.
PROGRAM:
OUTPUT:
Ex.No.7c
AIM:
To write a C program to copy the strings using strcpy()
ALGORITHM:
PROGRAM:
OUTPUT:
Enter string into s1: Engineering
s2: Engineering
AIM:
To write a C program to convert the strings to lower case, upper case, find string length.
ALGORITHM:
Start 1: start the program.
Start 2: get the string.
Start 3: using strlwr() fucntion to convert the lower case of the string.
Start 4: print the lower string.
Start 5: using strupr() fucntion to convert theupper case of the string.
Start 6: print the upper string.
Start 7: using strrev() fucntion to convert the reverse order of the string.
Start 8: using strlen() function to find the length of the string.
Strat 9: print the string.
Start 10: stop the program.
PROGRAM:
#include <stdio.h>
#include <conio.h>
#include <string.h>
void main()
{
char str[50];
clrscr();
printf("\n\t Enter your name : ");
gets(str);
printf("\nLower case of string: %s",strlwr(str));
printf("\nUpper case of string: %s",strupr(str));
printf("\nReverse of string: %s",strrev(str));
printf("\nLength of String: %d",strlen(str));
getch();
}
OUTPUT:
Enter your name : Colllege
Lower case of string: colllege
Upper case of string: COLLLEGE
Reverse of string: EGELLLOC
Length of String: 8
RESULT:
Thus, the given program has been executed successfully.
Ex.No.8
AIM:
To write a C program to swap two numbers using pointers.
ALGORITHM:
1. Declare the two pointer variables.
2. Get the value for both the variables.
3. Swap the values.
4. Print the result
PROGRAM:
#include<stdio.h>
#include<conio.h>
void swap(int *,int *);
void swap1(int,int);
void main()
{
int a,b,c,d;
clrscr();
printf("Enter the values of a and b:= ");
scanf("%d %d",&a,&b);
printf("Enter the values of c and d:= ");
scanf("%d %d",&c,&d);
printf("\n BEFORE SWAPPING : ");
printf("\n The value of a and b is : %d\t %d ",a,b);
printf("\n The value of c and d is : %d\t %d ",c,d);
printf("\n AFTER SWAPPING : ");
swap(a,b);
swap1(&c,&d);
printf("\n Method is:-Call by Value");
printf("\n **************************");
printf("\n The value of a and b is : %d\t %d",a,b);
printf("\n Method is:-Call by Address or Reference");
printf("\n ***************************");
printf("\n The value of c and d is : %d\t %d",c,d);
getch();
}
void swap(int *c,int *d)
{
int t;
t=*c;
*c=*d;
*d=t;
}
void swap1(int a,int b)
{
int t;
t=a;
a=b;
b=a;
}
OUTPUT:
AFTER SWAPPING:
RESULT:
Thus, the given program has been executed successfully.
EX.NO:9A
AIM:
To write a program in C
a. To print the Fibonacci series
ALGORITHM:
Step-1:Start
Step-2:Read the input variable n
Step-3:Call function fib(n)
Step-4:Stop.
FUNCTION:
Step-1:a=0,b=1
Step-2:print a, b
Step-3:for(i=0;i<n;i++)
Step-3-1:c=a+b
Step-3-2:a=b
Step-3-3:b=a
Step-3-4:prin c
Step-4:stop
PROGRAM:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,n;
clrscr();
printf("\n Enter the Fibonacci Series Limit\n");
scanf("%d",&n);
fib(n);
getch();
}
int fib(int n)
{
int a,b,c,i;
a=0;
b=1;
printf("\n FIBONACCI SERIES\n");
printf("\n%d\n%d",a,b);
for(i=0;i<n;i++)
{
c=a+b;
a=b;
b=c;
printf("\n%d",c);
}
return 0;
}
OUTPUT:
Enter Fibonacci Series Limit:5
FIBONACCI SERIES:
01123
EX.NO:9B
AI M:
To write a C program to find the factorial of a given number.
ALGORI THM
1. Start the program.
2. Declare the necessary variables.
3. Get the number from user to find the factorial.
4. Write a user defined function for factorial using the formula n*fact (n-1).
5. Print the factorial of the given number.
6. Stop the program.
PROGRAM:
#include<stdio.h>
#include<conio.h>
void main()
{
int fact(int);
int n,f,choice;
clrscr();
printf(Enter the number to find the factorial\n);
scanf(%d,&n);
f=fact(n);
printf(The factorial of a number %d using recursion is %d,n,f);
getch();
}
int fact(int n)
{
int f;
if(n==0)
return(1);
else
f=n*fact(n-1);
return(f);
}
OUTPUT
Enter the number to find the factorial
5
The factorial of a number 5 using recursion is 120
RESULT:
Thus, the given program has been executed successfully.
EX.NO:10A
AIM:
To prepare the mark sheet of n students using structures and to write a C program using
Structure.
ALGORITHM:
PROGRAM:
#include<stdio.h>
#include<conio.h>
struct student
{
char name[20];
int rno;
}s;
struct cse
{
int m1;
int m2;
int m3;
int m4;
int tot;
float avg;
struct student s;
}c[10];
void main()
{
int i,n;
clrscr();
printf("ENTER THE VEALUE OF n\n\n");
scanf("%d",&n);
printf("\nENTER NAME,RNO AND MARKS \n\n");
for(i=0;i<n;i++)
{
scanf("%s%d",c[i].s.name, &c[i].s.rno);
scanf("%d",&c[i].m1);
scanf("%d",&c[i].m2);
scanf("%d",&c[i].m3);
scanf("%d",&c[i].m4);
}
printf("\n\n\n");
printf("\t\t******************STUDENT DETAILS***************\n");
printf("\t------------------------------------------------------------------\n");
printf("\tNAME\tRNO\tM1\tM2\tM3\tM4\tTOTAL\tAVERAGE\n");
printf("\t------------------------------------------------------------------\n");
for(i=0;i<n;i++)
{
c[i].tot=c[i].m1+c[i].m2+c[i].m3+c[i].m4;
c[i].avg=(c[i].tot)/4;
printf("\t%s\t%d\t%d\t%d\t%d\t%d\t%d\t%.2f\n\n",c[i].s.name,c[i].s.rno,c[i].m1,
c[i].m2,c[i].m3,c[i].m4,c[i].tot,c[i].avg);
}
printf("\t------------------------------------------------------------------\n");
getch();
}
OUTPUT:
ENTER THE VEALUE OF n
2
ENTER NAME,RNO AND MARKS
Sugir
23
95
85
85
95
Jai
12
98
98
78
98
***********************STUDENT DETAILS******************
--------------------------------------------------------------------------------------NAME RNO M1 M2 M3 M4 TOTAL AVERAGE
---------------------------------------------------------------------------------------Sugi 23 95 85 85 95 360 90.00
Jai 12 98 98 78 98 372 93.00
EX.NO:10B
AIM:
To prepare the mark sheet of n students using structures and to write a C program using
Union.
ALGORITHM:
STEP-1: Start the program.
STEP-2: Defining the Union student with members.
STEP-3: Declare the necessary variables
STEP-5: Read the values declared for the variables.
STEP-6: Using reference the value is declared to the variables.
STEP-7: Display the values.
Step-8 : Print the result.
Step-9 : Stop.
PROGRAM:
#include<stdio.h>
#include<conio.h>
union student
{
int a;
char b[2];
}c;
void main()
{
c.a=256;
printf(\n Values Of c.a is = %d ,c.a);
print(\n Values Of c.b[0]=%d,c.b[0]);
printf(\n Values Of c.b[1]=%d,c.b[1]);
getch();
}
OUTPUT:
Value Of c.a is = 256
Value Of c.b[0] = 0
Value Of c.b[1] = 1
RESULT:
Thus, the given program has been executed successfully.