You are on page 1of 32

EXNO:1 (A

)
DOCUMENT CREATION AND TEXT MANIPULATION

#120,Old Mahabalipuram Road, Thuraipakkam, Cheai !00 11",Tamil Nadu,
#N$#A
%h: &"1'(('2("!2((( ) &"1'(('2("1*0!+ ,a-: &"1'(('2(".2(((

Posts Total no of
requirements for the
post
Experience
 Senior
Architect

5

8+
 Software
Deveo!er

"#

$+
Ex.No. 1.b
Te%t &'(tification) *'et( an+ n',-erin. an+ S!e Chec/in.
Bullets and Numbering
The Sought after companies by students during placement interview
are
 Info(0( Technoo.ie(
 1oo.e
 Micro(oft Technoo.ie(
 Tata Con('tanc0 So'tion(
 Co.ni2ant Technoo.0 So'tion(
 3i!ro Technoo.ie(
 Patni
 4e%aware So'tion(
Ex.No. 1.c
Te%t Mani!'ation with Scientific Notation(
DA5 " $ 6 7
L
U
N
C
4
8 9 8
MONDA5
HS6151
GE6162 MA6151 GE2116
HS6151
TUESDA5
GE6161 MA6151 CY2111
/E2112
3EDNESDA5
MA6151 GE6162 GE6161
T4URSDA5
HS6151
GE6151 PH6151 GE6151 GE2116 MA6151
MA2111
F!"#$ GE6151
GE6163 MA6151 GE6151
HS6151
Sample %utput
&athematical e'uation
(a)b*
+
,a
+
)+a
-
b)+ab
-
)b
+
T (m)0 ∑
m
= 1'∑
m
= 11 cij'tij'xij
.hemical e'uation
.
/
0
1-
%
/
)/%
-
1/.o
-
)/0
-
%
2C
2
H
2
(g) + *O
2
(g) → (CO
2
(g) + !H
2
O
EX NO 1'$
MAIL MER1IN1 IN 3ORD
From2
The Traii2 3 %la4eme5 O64er,
M#ET EN/#NEER#N/ CO77E/E,
Tri4h8'
To2
/o95ham
2., /adhi:i ;5ree5
Tri4h8'
"ear Students2
4ewett:Pac/ar+ conducting an off-campus on 6r+ &'0 "6 at
4ewett:Pac/ar+ *an.aore ;Eectronic( Cit0<= I am mailing ou the pattern
of the paper and placement procedure!
The first round is "ritten exam! The "ritten exam consisted of questions on
non-#er$al reasoning onl!
The second round is Extempore! In most of the cases the sa that spea% for 2
minutes on an topic of our choice! &o prepare a topic $efore ou go for the
exam!
The third round is technical inter#ie"! It "as quite simple! The as%ed the
questions from the topics mentioned in our resume onl!
ALL T4E *EST=

Yours
Ra.hav
Ex.No. -.a
1enerate Line Chart '(in. M( E%ce
O<er Ru;
1 (
2 10
. !
( 11
+ =
Ex.No. -.b
1enerate *ar Chart '(in. M( E%ce
"epartm
ent
First
year
Student
Second
year
Students
Third
year
Students
Final year
students
Name mar31 mar3- mar3+ mar34
Aad =" +! (+ *=
Aru 1+ 2. 2! (+
A;9i *= =" !+ (+
>har5h 11 .2 22 ++
>ala:i *= (= != +2
s
.SE =2 "= 110 100
E.E 10! 11+ 100 "!
!T 2* !. !+ !.
EEE !* !. ++ (+
&E.0 !+ *2 !" !.
Ex.No. -.c
1enerate Pie Chart '(in. M( E%ce
"rive 5til
C +0
$ .0
E 10
?par5i5ioed 10
Ex.No. -.d
1enerate X5 Chart '(in. M( E%ce
%rodu4
5
1;5
@uar5er
2d
@uar5er
.rd
@uar5er
(5h
@uar5e
r
produ4
51 200 (=+ 1(+* (+!
produ4
52 !.+ =+( (1+ 1(+
produ4
5. 1(* 2+! (+= 2+(
Ex.No. +
Drawin.:>ow Chart
' flo"chart for computing the roots of a quadric equation( gi#en the coefficients '( )( and C
Ex.No 4 a
>in+ the 1iven 0ear i( Lear 5ear or Not ;'(in. if e(e (tate,ent<
PRO1RAM?
*+ Chec% for ,eap Year+*
-include.stdio!h/
main01
2
int ear3
printf 04Enter the ear 5n413
scanf046d4( 7ear13
if 0ear6899:1
printf04It is a ,eap Year 5n413
else
printf04It is ;ot a ,eap Year5n413
<
OUTPUT?
Enter the ear 2::8
It is a ,eap Year
Enter the ear 1==>
It is not a ,eap Year

Ex.No 4 b
De,on(trate Arith,etic O!eration( ;U(in. Switch@Ca(e<
*+ Program to demonstrate arithmetic operations +*
-include.stdio!h/
-include.conio!h/
#oid main01
2
int a( $( c( n3
clrscr013
printf0?1! 'ddition5n@13
printf0?2! &u$traction5n@13
printf0?A! Bultiplication5n@13
printf0?8! Ci#ision5n@13
printf0?:! Exit5n@13
printf0?Enter our choice D ?13
scanf0?6d@(7n13
printf0?Enter the t"o num$ers D@13
scanf0?6d(6d@(7a(7$13
s"itch0n1
2
case 1D
c 9 a E $3
printf0?'ddition D6d5n@(c13
$rea%3
case 2D
c 9 a F $3
printf0?&u$traction D6d5n@(c13
$rea%3
case AD
c 9 a + $3
printf0?Bultiplication D6d5n@(c13
$rea%3
case 8D
c 9 a * $3
printf0?Ci#ision D6d5n@(c13
$rea%3
case :D
exit0:13
$rea%3
<
getch013
<
%5T65T7
1! 'ddition
2! &u$traction
A! Bultiplication
8! Ci#ision
:! Exit
Enter Your Choice D 1
Enter the 2 nos a and $D 2 >
'ddition D 1:!
Enter Your Choice D 2
Enter the 2 nos a and $D G 2
&u$traction D A!
Enter Your Choice D A
Enter the 2 nos a and $D 2 >
Bultiplication D 16!
Enter Your Choice D 8!
Enter the 2 nos a and $D > 8
Ci#ision D 2!
Enter Your Choice D :!
Exit!
Ex.No 4 c
Eva'ate the .iven E%!re((ion
-include.stdio!h/
main01
2
int a($(c3
float x((H3
printf 04Enter the #alues for a($(c 5n413
scanf046d(6d(6d4( 7a(7$(7c13
x 9 0a + $1 F c3
9 0$*c1 + a3
H 9 0a - $1 * 0c E d1
printf04 The #alue of x is ?(x @the #alue of is ?( @The #alue of H is ?(H 13
<
OUTPUT?
Enter the va'e for a)-)c=
aA 5B - A 8B cA "$B
% A $8=###B
0 A $=5###
2 A #=#555
Ex.No 8 a
Rea+in. an+ writin. a (trin. '(in. whie oo!
- include .stdio!h/
- include .conio!h/
main0 1
2
char ch3
clrscr013
printf0?5n Enter a string@13
"hile00 ch9getchar0 11I9J5nJ1
putchar0ch13
getch013
<
OUTPUT?
Enter the (trin.
4i weco,e to CSE +e!art,ent
Ex.No 8 b
Lar.e(t of three n',-er( ;'(in. if e(eif e(e<
-include.stdio!h/
-include.conio!h/
main01
2
int a($(c3
clrscr013
printf0?)iggest of three ;oJs@13
printf0?Enter the #alues of '()(C@13
scanf0?6d6d6d@(7a(7$(7c13
if00a/$1770$/c11
printf0?5n a96d is greatest@(a13
else if0$/c1
2
printf0?5n $96d is greatest@($13
<
else
2
printf0?5n c96d is greatest@(c13
<
getch013
<
OUTPUT?
Enter the va'e( of A) *) C? "# $# 5
* A $# i( .reate(t
Ex.No 8 c
Pain+ro,e
-include.stdio!h/
main01
2
unsigned long int a( num( rK num9:(rem3
printf0?5nEnter the num$er@13
scanf0?6ld@(7num13
a9num3
"hile0numI9:1
2
rem9num61:3
rK num9rK num+1:Erem3
num9num*1:3
<
printf0?5nThe re#erse num$er of the 6ld is 6ld@(a(rK num13
if0a99rK num1
printf0?5nThe gi#en num$er is a palindrome@13
else
printf0?5nThe gi#en num$er is not a palindrome@13
<
OUTPUT?
Enter the num$er!!!22A22
The re#erse num$er of the 22A22 is 22A22
The gi#en num$er is a palindrome
Enter the num$er!!!12A22
The re#erse num$er of the 12A22 is 22A21
The gi#en num$er is not a palindrome
Ex.No78 d
1eneratin. Pa(ca trian.e '(in. >or Loo!
-include.&tdio!h/
-include.conio!h/
#oid main01
2
int aL2:ML2:M( i (N (n( s92G( %3
printf045n enter the num$er of linesD413
scanf046d4( 7n13
for0i9:3i.n3 iEE1 **outer loop for ro"s
for0%9s-2+i3 %/9:3%--1
printf04 413
for0N9:3N.9i3NEE1 **inner loop for columns
2
if0N99:OOi99N1
aLiMLNM913
else
aLiMLNM9aLi-1MLN-1MEaLi-1MLNM3
printf0468d4(aLiMLNM13
printf045n413
<
getch013
<
%5T65T7
Enter the num$er of linesD6
1
1 1
1 2 1
1 A A 1
1 8 6 8 1
1 G 1: 1: G 1
Ex.No 8 e
1eneration of Ar,(tron. N',-er(
-include.stdio!h/
main01
2
int num$er( temp( digit1( digit2( digitA3
printf04Printing all 'rmstrong num$ers $et"een 1 and G::D5n5n413
num$er 9 ::13
"hile 0num$er .9 G::1
2
digit1 9 num$er - 00num$er * 1:1 + 1:13
digit2 9 0num$er * 1:1 - 00num$er * 1::1 + 1:13
digitA 9 0num$er * 1::1 - 00num$er * 1:::1 + 1:13
temp 9 0digit1+digit1+digit11 E 0digit2+digit2+digit21 E 0digitA+digitA+digitA13
if 0temp 99 num$er1
2
printf045n'mstrong ;um$erD6d4( temp13
<
num$erEE3
<
<
OUTPUT?
Enter the num$er up to "hich 'rmstrong num$ers are to $e generatedD
G::
'rmstrong num$ers are D 1(1GA(AP:(AP1(8:P
Ex.No / a
One Di,en(iona Arra0
-include.stdio!h/
#oid main01
2
int arrLAM(i3
printf0?Enter A #alues5n@13
for0i9:3i.A3iEE1
2
scanf0?6d@(7arrLiM1
<
printf0?The entered #alues areD5n@13
for0i9:3i.1:3iEE1
2
printf0?6d5t@(arrLiM1
<
<
OUTPUT?
Enter 6 va'e(
$$
$6
$7
The Entere+ va'e( are
$$
$6
$7
Ex.No / b
Two Di,en(iona Arra0
-include .stdio!h/

int main01
2
int m( n( p( q( c( d( %( sum 9 :3
int firstL1:ML1:M( secondL1:ML1:M( multiplL1:ML1:M3
clrscr013

printf04Enter the num$er of ro"s and columns of first matrix5n413
scanf046d6d4( 7m( 7n13
printf04Enter the elements of first matrix5n413

for 0 c 9 : 3 c . m 3 cEE 1
for 0 d 9 : 3 d . n 3 dEE 1
scanf046d4( 7firstLcMLdM13

printf04Enter the num$er of ro"s and columns of second matrix5n413
scanf046d6d4( 7p( 7q13

if 0 n I9 p 1
printf04Batrices "ith entered orders canQt $e multiplied "ith each other!5n413
else
2
printf04Enter the elements of second matrix5n413

for 0 c 9 : 3 c . p 3 cEE 1
for 0 d 9 : 3 d . q 3 dEE 1
scanf046d4( 7secondLcMLdM13

for 0 c 9 : 3 c . m 3 cEE 1
2
for 0 d 9 : 3 d . q 3 dEE 1
2
for 0 % 9 : 3 % . p 3 %EE 1
2
sum 9 sum E firstLcML%M+secondL%MLdM3
<

multiplLcMLdM 9 sum3
sum 9 :3
<
<

printf04Product of entered matricesD-5n413

for 0 c 9 : 3 c . m 3 cEE 1
2
for 0 d 9 : 3 d . q 3 dEE 1
printf046d5t4( multiplLcMLdM13

printf045n413
getch013
<
<
return :3
<
OUTPUT
Enter the num$er of ro"s and columns of first matrix
2 2
Enter the elements of first matrix
A 8
8 G
Enter the num$er of ro"s and columns of first matrix
2 A
Enter the elements of second matrix
8 G
8 G
6 P
Product of entered matrices
A2 A= 8:
Ex.No79
Sovin. !ro-e,( U(in. Strin. >'nction(
-include .stdio!h/
-include .string!h/

int main01
2
char aL1::M( $L1::M3

printf04Enter the first stringCn413
gets0a13

printf04Enter the second stringCn413
gets0$13

if0 strcmp0a($1 99 : 1
printf04Entered strings are equal!Cn413
else
printf04Entered strings are not equal!Cn413

return :3
<
OUTPUT?
Enter the fir(t (trin.
MIET
Enter the (econ+ (trin.
MIET En.ineerin. coe.e
Entere+ the (trin.( are not eD'a
Ex.No :.a
Swa!!in. Of Two N',-er( U(in. Ca *0 Ea'e
-include.stdio!h/
-include.conio!h/
main01
2
int n1(n23
#oid s"ap0int (int13
clrscr013
printf045n Enter the t"o num$ers413
scanf046d6d4(7n1(7n213
printf045n )efore s"apping the #alues of n1 9 6d and n2 9 6d4(n1(n213
s"ap0n1(n213
getch013
<
#oid s"ap0int a(int $1
2
a9aE$3
$9a-$3
a9a-$3
printf045n 'fter s"apping the #alues of n1 9 6d and n2 9 6d4(a($13
<
OUTPUT?
Enter the two n',-er(
5
"#
*efore (wa!!in. the va'e( of n" A5 an+ n$ A"#
After (wa!!in. the va'e( of n" A"# an+ n$ A 5
Ex.No :.b
Swa!!in. Of Two N',-er( U(in. Ca -0 Reference
-include.stdio!h/
-include.conio!h/
main01
2
int n1(n23
#oid s"ap0int +(int +13
clrscr013
printf045n Enter the t"o num$ers413
scanf046d6d4(7n1(7n213
printf045n )efore s"apping the #alue of n19 6d and n29 6d4(n1(n213
s"ap07n1(7n213
printf045n 'fter s"apping the #alue of n19 6d and n29 6d4(n1(n213
getch013
<
#oid s"ap0int +a(int +$1
2
int t3
t 9 +a3
+a 9 +$3
+$ 9 t3
<
OUTPUT?
Enter the two n',-er(
5
"#
*efore (wa!!in. the va'e of n" A 5 an+ n$ A "#
After (wa!!in. the va'e of n" A "# an+ n$ A 5
Ex.No ; a

>actoria Co,!'tation U(in. Rec'r(ive >'nction
-include.stdio!h/
main01
2
int num(a3
printf0?Enter the num$er@13
scanf0?6d@(7n13
a9recur0n13
printf0?The factorial of the num$er 6d is 6d@(n(a13
<
recur0int n1
2
int fact913
if0n9911
return0113
else
fact9n+recur0n-113
<
OUTPUT?
Enter the n',-er 5
The factoria of the n',-er 5 i( "$#
Ex.No ; b
-include .stdio!h/
-define PI A!181
int main01
2
float r( a(c3
printf04RadiusD 413
scanf046f4( 7r13
a 9 PI + r + r3
c 9 2 +PI + r3
printf046f5n4( a13
printf046f5n4( c13
return :3
<

Conver(ion >ro, 1iven Pro.ra, To >ow Chart
Ex.No 1< a
EMPLO5EE PA5ROLL USIN1 STRUCTURE
-include.stdio!h/
-include.conio!h/
struct emploee
2
char nameL1GM3
int empid3
float $sal3
float nsal3
float gross3
<3
#oid main01
2
struct emploee emp3
float hra(da(tax3
clrscr013
printf045nEmploee Cetails413
printf045nEnter the emploee name413
scanf046s4(emp!name13
printf045nEnter the emploee id413
scanf046d4(7emp!empid13
printf045nEnter the $asic salar413
scanf046f4(7emp!$sal13
hra9001:+emp!$sal1*1::13
da900AG+emp!$sal1*1::13
tax9001G+emp!$sal1*1::13
emp!gross9emp!$salEhraEda3
emp!net9emp!gross-tax3
printf045nEmploee nameD6s4(emp!name13
printf045nEmploee noD6d4(emp!empid13
printf045nEmploee )asic salarD6f4(emp!$sal13
printf045nSR'D6f4(hra13
printf045nC'D6f4(da13
printf045nTaxD6f4(tax13
printf045n;et&alar6f4(emp!nsal13
printf045nGross salarD6f4(emp!gross13
getch013
<
%5T65T7
E,!o0ee Detai(?
Enter the e,!o0ee na,e ? Ro-in
Enter the e,!o0ee I+ ? "##
Enter the -a(ic (aar0 ? 6####
E,!o0ee na,e ? Ro-in
E,!o0ee I+ ? "##
E,!o0ee *a(ic (aar0 ? 6####=######
4RA ? 6###=######
DA ? "#)5##=######
Ta% ? 75##=######
1ro(( (aar0 ? 6F###=######
E%=No "#=-
St'+ent Mar/( U(in. Union
-include.stdio!h/
main01
2
union student
2
char nameL2:M3
char regnoL12M3
int a#g3
char grade3
< studL2GM(+ptr3
int i(no3
printf0?Enter the num$er of the students!!!@13
scanf0?6d@(7no13
for0i9:3i.no3iEE1
2
printf0?5n studentL6dM informationD5n@(iE113
printf0?Enter the name@13
scanf0?6s@(studLiM!name13
printf0?5nEnter the roll no of the student@13
scanf0?6s@(studLiM!regno13
printf0?5nEnter the a#erage #alue of the student@13
scanf0?6d@(7studLiM!a#g13
<
pt9stud3
for0pt9stud3pt.studEno3ptrEE1
2
if0ptr-/a#g.A:1
ptr-/grade9JCJ3
else if0ptr-/a#g.G:1
ptr-/grade9JCJ3
else if0ptr-/a#g.P:1
ptr-/grade9J)J3
else
ptr-/grade9J'J3
< printf0?5n@13
printf0?;'BE REGI&TER-;T 'UER'GE GR'CE5n@13
for0ptr9stud3ptr.studEno3ptEE1
2
printf0?6-2:s6-1:s@(ptr-/name(ptr-/regno13
printf0?61:d 5t 6c5n@(ptr-/a#g(ptr-/grade13
<
<
St'+ent Mar/( U(in. Union
OUTPUT?
Enter the n',-er of the (t'+ent(
6
(t'+entG"H infor,ation?
Enter the na,e &ac/
Enter the ro no of the (t'+ent 6"9#5$#5##"
Enter the avera.e va'e of the (t'+ent F#
(t'+entG$H infor,ation?
Enter the na,e RaI
Enter the ro no of the (t'+ent 6"9#5$#5##$
Enter the avera.e va'e of the (t'+ent 88
(t'+entG6H infor,ation?
Enter the na,e Jiran
Enter the ro no of the (t'+ent 6"9#5$#5##6
Enter the avera.e va'e of the (t'+ent 95
NAME RE1ISTER:NO AEERA1E 1RADE
&ac/ 6"9#5$#5##" F# S
RaI 6"9#5$#5##$ 88 A
Jiran 6"9#5$#5##6 95 *