Вы находитесь на странице: 1из 77

VISITING CARD Aim:

Prepare a Visiting Card for a Managing Director for the Company KAL InfoTech as per the following specifications. i!e of the "isiting Card #.$% & '% (ame of the Company with a )ig font. Phone n*m)er and e+mail address with appropriate sym)ols ,ffice and residence address separated )y a line.

Proced*re:
tep -: tart M .ord tart Programs M .ord tep ': It opens the M option. .ord editor. Clic/ on 0ile men* and elect the page set*p

tep #: It opens the page set*p window. Change the left1 right1 top and )ottom margins to 2.-% tep 3: elect the Paper i!e Ta) and change the width1 height to #.$% 4 '% respecti"ely and select landscape option in orientation frame. Clic/ ,K. tep $: tart designing yo*r Card.

'

MAIL MERGE Aim:


Create an inter"iew call letter as the main doc*ment and create 3 records for 3 persons. 5se mail merge to create a common letter to all these fo*r.

Proced*re:
tep -: tart M .ord tart Programs M .ord tep ': It opens the M .ord editor. Clic/ on Tools and select Mail Merge ,ption. tep#: It opens the mail merge helper window. Clic/ on Create )*tton and select form letters option. pecify the window in which it has to create the records. tep 3: Clic/ on Acti"e .indow. tep $: Clic/ on 6et Data )*tton and select Create data o*rce option. It opens create data so*rce window in which we select the fields re7*ired for o*r mail. Clic/ on ,K 8*tton and pro"ide the file name. tep 9: Clic/ on :dit Data o*rce It opens the Data 0orm window and we need to pro"ide the details. 0inally clic/ on ,K tep ;: .rite yo*r letter. tep <: Clic/ on Insert Merge field in the men* )ar1 to insert the fields in the To Address of yo*r letter. tep =: Clic/ on >>A8C?? 8*tton to Merge the "al*es. tep -2:Clic/ on Merge 8*tton. It opens the Merge options. elect Merge and Clic/ ,K.

Tir*pati1 '<+2=+'2-2. 0rom . Amar Deep M.D. wiss ol*tions Tir*pati. To @0irst(ameA @Address'A @CityA @PostalCodeA *): Inter"iew Call Letter. Dear Candidate1 This is to inform yo* that yo*r name has )een short listed for the post of Programmer. Please attend the inter"iew on ';+-2+'2-2. Two copies of 8iodata and all the testimonials1 along with a photo ha"e to )e carried. .ishing for yo*r )est l*c/. Bo*rs tr*ly1 Amar Deep

Tir*pati1 '<+2=+'2-2. 0rom . Amar Deep M.D. wiss ol*tions Tir*pati. To Kiran /*mar --+-'+-# Tir*pati $-;$2' *): Inter"iew Call Letter. Dear Candidate1 This is to inform yo* that yo*r name has )een short listed for the post of Programmer. Please attend the inter"iew on ';+-2+'2-2. Two copies of 8iodata and all the testimonials1 along with a photo ha"e to )e carried. .ishing for yo*r )est l*c/. Bo*rs tr*ly1 ACay /*mar

Tir*pati1 '<+2=+'2-2. 0rom . Amar Deep M.D. wiss ol*tions Tir*pati. To 6opal 8h*shan hinday -'#+3$D9;< Chennai #'-9$3 *): Inter"iew Call Letter. Dear Candidate1 This is to inform yo* that yo*r name has )een short listed for the post of Programmer. Please attend the inter"iew on ';+-2+'2-2. Two copies of 8iodata and all the testimonials1 along with a photo ha"e to )e carried. .ishing for yo*r )est l*c/. Bo*rs tr*ly1 Amar Deep

Tir*pati1 '<+2=+'2-2. 0rom . Amar Deep M.D. wiss ol*tions Tir*pati. To 6opi Eh*nEh*nwala -'+'#DAD8DC Patiyala ;<=3$9 *): Inter"iew Call Letter. Dear Candidate1 This is to inform yo* that yo*r name has )een short listed for the post of Programmer. Please attend the inter"iew on ';+-2+'2-2. Two copies of 8iodata and all the testimonials1 along with a photo ha"e to )e carried. .ishing for yo*r )est l*c/. Bo*rs tr*ly1 Amar Deep

Tir*pati1 '<+2=+'2-2. 0rom . Amar Deep M.D. wiss ol*tions Tir*pati. To 6opi Mihir F3$' Tir*pati ;<='-3 *): Inter"iew Call Letter. Dear Candidate1 This is to inform yo* that yo*r name has )een short listed for the post of Programmer. Please attend the inter"iew on ';+-2+'2-2. Two copies of 8iodata and all the testimonials1 along with a photo ha"e to )e carried. .ishing for yo*r )est l*c/. Bo*rs tr*ly1 Amar Deep

'

MACRO Aim :
.rite a MACG, to format a doc*ment as gi"en )elow. -. Line spacing ' '. Paragraph indent of 2.-2 #. E*stification formatting tyle 3. Arial font of -$Pt i!e.

Proced*re:
tep -: tart M .ord tart Programs M .ord tep ': It opens the M .ord editor. Clic/ on Tools and select Macros s*)men* and select the Gecord (ew Macro option. tep #: It opens the record macro window. tep 3: Clic/ on Key 8oard option. It opens the C*stomi!e /ey)oard window. Pro"ide the hort c*t /ey and clic/ on Assign )*tton. And Clic/ on Close 8*tton. tep $: (ow the recording is got started. tep 9: elect the format Men* and Clic/ on Paragraph option and change the Line spacing to do*)le. tep ;: elect the indentation to 2.-2 tep <: elect E*stify in Alignment and clic/ on ,/. tep =: Chang the font to Arial and its si!e of -$Pt i!e. tep -2: top the Macro Gecording. tep --: Press the hort c*t Key to apply the macro that we ha"e recorded.

TYPES OF SOFTWARE
Software is a set of electronic instructions that tells the computer how to do certain tasks. A set of instructions is often called a program. When a computer is using a particular program, it is said to be running or executing the program. The two most common types of programs are system software and application software. System Software System software exists primarily for the computer itself, to help the computer perform specific functions. One major type of system software is the operating system OS!. All computers re"uire an operating system. The OS tells the computer how to interact with the user and its own de#ices. $ommon operating systems include Windows, the %acintosh OS, OS&', and ()*+ . When we turn on a computer, it goes se#eral steps to prepare itself for use. The first step is called the power,on self test -OST!. The computer identifies the de#ices attached to it, identifies the amount of memory a#ailable, and does a "uick check to see whether the memory is functioning properly. Application Software Application software tells the computer how to accomplish tasks the user re"uires, such as creating a document or editing a graphic image. Some important kinds of application software are. Application software tells the computer how to accomplish tasks the user re"uires, such as creating a document or editing a graphic image. Some important kinds of application software are. %S,O//*$0, TA112, etc

TYPES OF SOFTWARE Software is a set of electronic instructions that tells the computer how to do certain tasks. A set of instructions is often called a program. When a computer is using a particular program, it is said to be running or executing the program. The two most common types of programs are system software and application software. System Software System software exists primarily for the computer itself, to help the computer perform specific functions. One major type of system software is the operating system OS!. All computers re"uire an operating system. The OS tells the computer how to interact with the user and its own de#ices. $ommon operating systems include Windows, the %acintosh OS, OS&', and ()*+ . When we turn on a computer, it goes se#eral steps to prepare itself for use. The first step is called the power,on self test -OST!. The computer identifies the de#ices attached to it, identifies the amount of memory a#ailable, and does a "uick check to see whether the memory is functioning properly. Application Software Application software tells the computer how to accomplish tasks the user re"uires, such as creating a document or editing a graphic image. Some important kinds of application software are. Application software tells the computer how to accomplish tasks the user re"uires, such as creating a document or editing a graphic image. Some important kinds of application software are. %S,O//*$0, TA112, etc

CONVERSIONS Aim:
To create an electronic spread sheet in which yo* enter the following Decimal n*m)ers and con"ert them into ,ctal1 He&a decimal and 8inary n*m)ers "ice "ersa.

Proced*re:
tep -: tart M :&cel tart Programs M :&cel tep ': elect Add+ins from tools men* and select the analysis toolpac/ chec/ )o&. tep #: 6i"e the necessary headings li/e Decimal1 8inary1 ,ctal1 He&a Decimal in the first row. tep 3: 6i"e the Decimal n*m)er in the Decimal heading col*mn. tep $: 6o to 8inary col*mn and gi"e the form*la as Idec')in Jcell addressK. tep 9: 6o to ,ctal col*mn and gi"e the form*la as Idec'oct Jcell addressK. tep ;: 6o to He&a decimal col*mn and gi"e the form*la as I dec'he& Jcell addressK. tep <: 6i"e the necessary heading in the row li/e 8inary1 Decimal1 ,ctal and He&a. tep =: 6i"e the 8inary n*m)ers in 8inary heading col*mn. tep -2: 6o to Decimal col*mn and gi"en the form*la as I)in'dec Jcell addressK. tep --: 6o to ,ctal col*mn and gi"e the form*la as I)in'oct Jcell addressK. tep -': 6o to He&a decimal and gi"en the form*la as I)in'he& Jcell addressK.

CONVERTING FRO
!ECI A& 34 89 :4 584 ''4 344 3;4 784 "INARY 566655 5666566 5655555 56566565 55566665 565566655 565556555 555656665

!EC TO "IN#OCT AN! $E%A!ECI A&


OCTA& 73 567 53; '74 375 473 48; ;'5 $E%A!ECI A& '3 77 4/ A4 05 583 5;; 5<5

CONVERTING FRO
"INARY 565 5565 555655 56665 556655665 555655555

"IN TO !EC#OCT AN! $E%A!ECI A&


OCTA& 4 54 ;3 '5 835 ;3; $E%A!ECI A& 4 < 3= 55 5:: 5</

!ECI A& 4 53 4: 5; 76: 7;:

STUDENT RESULT Aim:


Create a *ita)le e&amination data)ase and find the s*m of the mar/s of each st*dent and the respecti"e class sec*red )y the st*dent. Pass L #$M Distinction L ;$M 0irst class L 92M econd Class L $2M Third Class L #$M

Proced*re:
tep -: tart M :&cel tart Programs M :&cel tep ': Pro"ide the (ecessary data. tep #: In the Total 0ield for the 0irst Gecord .rite the following form*la. ID3N:3N03 tep 3: Drag it *p to the end of this col*mn. <

tep $: In the A"erage 0ield for the 0irst Gecord .rite the following form*la. I63D# tep 9: Drag it *p to the end of this col*mn. tep ;: In the Ges*lt 0ield for the 0irst Gecord .rite the following form*la. II0JA(DJD3?I#$1:3?I#$103?I#$K1OPassO1O0ailOK tep <: Drag it *p to the end of this col*mn. tep =: In the Class 0ield for the 0irst Gecord .rite the following form*la. II0JA(DJI3IOPassO1H3?I;$K1ODistinctionO1I0JA(DJI3IOPassO1H3>;$1H3?I92K1O0irst ClassO1I0JA(DJI3IOPassO1H3>921H3?I$2K1O econd ClassO1I0JA(DJI3IOPassO1H3>$21H3?I#$K1OThird ClassO1O0ailOKKKK tep -2: Drag it *p to the end of this col*mn.

ST'!ENT !ETAI&S
Sno 5665 566' 5663 5667 5664 5668 566; 5669 566: 5656 Sname Arun. > %urali. ? @ani. % 1atha. T ?ajesh. 1 Suresh. = Samad. A >iran. < Aopi. ) ?ammurty. S S()* 566 9: 74 ;9 34 7; 5' 96 54 34 S()+ S(), Total A-era.e 566 :9 47 89 37 79 53 ;: '4 39 566 :9 74 48 34 7: 57 ;9 34 3; 366 '94 577 '6' 567 577 3: '3; ;4 556 566.66 :4.66 79.66 8;.33 37.8; 79.66 53.66 ;:.66 '4.66 38.8; Res(lt -ass -ass -ass -ass /ail -ass /ail -ass /ail -ass Class <istinction <istinction Third $lass /irst $lass /ail Third $lass /ail <istinction /ail Third $lass

-2

PRODUCT CHART Aim:


The KAL InfoTech company shows the sales of Different prod*cts for $ years. Create 8argraph1 #D and Pie Charts for the following.
2ear 5:9: 5::6 5::5 5::' 5::3 -roduct5 5666 9666 5'66 766 5966 -roduct' 966 96 5:6 '66 766 -roduct3 :66 466 766 366 766 -roduct7 5666 :66 966 5666 5'66

Proced*re:
tep -: tart M :&cel tart Programs M :&cel tep ': Pro"ide the (ecessary data. tep #: elect the data and clic/ on Charts wi!ard. tep 3: It opens the charts wi!ard and yo* select the Col*mn ,ption and clic/ the ne&t )*tton. --

tep $: In the ne&t window clic/ on the ne&t )*tton. tep 9: In the ne&t window Pro"ide the Chart title as KAL InfoTech ales Chart tep ;: In the 4 A&is pro"ide the title as Bear tep <: In the B A&is pro"ide the title as ales and clic/ on ne&t )*tton and to concl*de the finish 0inish. tep =: Gesi!e the chart according to the need. tep -2: The same proced*re to )e repeated for the #D and Pie 6raphs.

-'

Bar Chart /A& InfoTec0 Sales C0art


'666 5466 Sales 5666 466 6 5:9: 5::6 5::5 5::' 5::3 Years -roduct5 -roduct' -roduct3 -roduct7

3D Chart /A& InfoTec0 Sales C0art


'666 5466 Sales 5666 466 6 5:9: 5::6 5::5 5::' 5::3 Years -roduct5 -roduct' -roduct3 -roduct7

PIE Chart

/A& Infotec0 Sales C0art


5666 5966 966 766

5:9: 5::6 5::5 5::' 5::3

5'66

-#

DEPARTMENT PRESENTATION Aim:


Prepare a Presentation a)o*t yo*r Department *sing M + PowerPoint.

Proced*re:
tep -: tart M PowerPoint. tart P Programs P M PowerPoint. tep ': In lide - 6i"e the Title of the lide as Department of Comp*ter cience. tep #: In lide ' 6i"e the title as ,rigin and pro"ide the origin information. tep 3: In lides # Q 3 6i"e the title as 6rowth and pro"ide the information a)o*t the departments 6rowth. tep $: In lide $ 6i"e the title as Co*rses and pro"ide necessary information. tep 9: In lide 9 Q ; gi"e the Titles as 8. c1 8.Com and 8.A and pro"ide its information. tep ;: In the slide < 6i"e the title as Geso*rces and pro"ide the necessary information. tep <: In the lide =1 -2 Q -- pro"ide the titles Teaching1 Learning and :"al*ations and pro"ide the (ecessary information. tep =: In lide -' Q -# gi"e the title as Infrastr*ct*re Q Learning Geso*rces and pro"ide the necessary (ecessary. tep -2: a"e the presentation.

-3

-$

-9

-;

-<

ANDHRA BANK PRESENTATION Aim:


Prepare a Presentation a)o*t Andhra 8an/ *sing M + PowerPoint.

Proced*re:
tep -: tart M PowerPoint. tart P Programs P M PowerPoint. tep ': In lide - 6i"e the Title of the lide as Andhra 8an/. tep #: In lide ' 6i"e the title as :sta)lishment and pro"ide the esta)lishment information. tep 3:In lides # 6i"e the title as Types of Transactions and pro"ide the information a)o*t the transactions. tep $: In lide 3 6i"e the title as a"ings and pro"ide necessary information. tep 9: In lide $ gi"e the Title as Ins*rance ,pport*nities and pro"ide its information. tep ;: In the slide 9 6i"e the title as Mediclime and pro"ide the necessary information. tep <: In the lide ; pro"ide the title G*les and Geg*lations and pro"ide the necessary information. tep =: In lide < gi"e the title as Policies and hares and pro"ide the necessary information. tep -2: In lide = gi"e the title as ATM and pro"ide the necessary information. tep --: In lide -2 gi"e the title as (ew Plans and pro"ide the necessary information. tep -': In lide -- gi"e the title as Concl*sion and concl*de the presentation )y pro"iding necessary information and sa"e the presentation.

-=

'2

'-

''

STUDENT DETAILS USING QUERIES Aim:


Create a data)ase called t*dent *sing M ACC:
Student /ield )ame <ata Type regno )umber name Text <ob <ate Aender Text $lass Text

with at least -2 records.

%arks /ield )ame <ata Type regno )umber %5 )umber %' )umber %3 )umber %7 )umber %4 )umber

Proced*re:
tep -: tart M ACC: . tart P Programs P M ACC: tep ': Clic/ on the 8lan/ ACC: .

Data )ase and select ,K

tep #: Pro"ide the Data)ase name as t*dent and clic/ on Create tep 3: It opens the t*dent Data)ase window. tep $: In ,)Cects frame select the Create Ta)le in Design "iew option. tep 9: It opens the ta)le window. Here pro"ide the field names of the st*dent ta)le along with data types. tep ;: Gight clic/ on regno 0ield and elect the Primary /ey option. tep <: a"e the ta)le and gi"e the name as t*dent. tep =: Gepeat the steps $1 9 and tep < to create the Mar/s ta)le with the gi"en fields :&cept tep ;. tep -2: Clic/ on R*eries option in the o)Cects frame and select create 7*ery in design "iew option. tep --: It opens the show ta)le window. tep -': elect the ta)le t*dent and clic/ on Add )*tton1 elect the Mar/s ta)le and clic/ on Add 8*tton. 0inally clic/ on Close )*tton. tep -#: Drag and drop all the re7*ired fields from the a"aila)le ta)les to the frame gi"en )elow. tep -3: In the total field write the following form*la Total : SM-TN SM'TN SM#TN SM3TN SM$T tep -$: a"e and gi"e the name as t*dent 7*ery. Close the window. tep -9: Do*)le Clic/ on the t*dent 7*ery. tep -;: a"e and close.

'#

Table data

Q er!" d#$%la!#&' re'&() &a*e) 'e&der) t(tal *ar+$

STUDENT DETAILS USING REPORTS


'3

Aim:
Create a report called t*dent *sing M ACC:
Student /ield )ame <ata Type regno )umber name Text <ob <ate Aender Text $lass Text

with at least -2 records.

%arks /ield )ame <ata Type regno )umber %5 )umber %' )umber %3 )umber %7 )umber %4 )umber

Proced*re :
tep -: tart M ACC: . tart P Programs P M ACC: tep ': Clic/ on the ,pen e&isting ACC: tep #: It opens the st*dent data)ase. tep 3: elect Geports option in the o)Cects frame and clic/ on Create report )y *sing .i!ard option. tep $: elect the re7*ired fields from the different ta)les and 7*eries a"aila)le in the Ta)leD7*eries option. tep 9: It as/s for the creation of the relation again. SIf necessaryT Pro"ide the relation again and clic/ and close the window. tep ;: It contin*es with reports wi!ard. tep <: elect )y mar/s option in how do yo* want to "iew yo*r data frame and clic/ on (e&t )*tton. tep =: Clic/ on ne&t )*tton again. tep -2: elect no to as the sorting order and clic/ on (e&t )*tton. tep --: elect the layo*t and orientation as ta)*lar and portrait and clic/ on ne&t )*tton. tep -': elect the report style as 8old. And clic/ on ne&t )*tton. tep -#: 0inally type the title of the report and clic/ on 0inish )*tton. tep -3: a"e and gi"e the name of the report and close the window. tep -$: Do*)le clic/ on the report to e&ec*te the report. . Data)ase and select t*dent and clic/ ,K.

'$

Re%(rt " ,#th Re' &() &a*e) *ar+$ (- all $ b.e/t$ a&d t(tal

'9

PRIME NUMBER (r NOT Aim :


To find that whether the gi"en n*m)er is Prime n*m)er or (ot.

Algorithm :
tep -: tart tep ': /2 tep #: Gead n*m tep 3: 0or i- repeat *ntil Ji>In*mK tep 3.-: If Jn*mMiKI2 //Ntep 3.': iiNtep $: If J/I'K then .rite U n*m)er is Prime % ,therwise1 .rite U n*m)er is (ot Prime% tep 9: top.

';

0low Chart :

tart /2

Gead n*m 0alse 0alse Tr*e 0or i - to Ji>n*mK Tr*e 0alse /2 Tr*e Tr*e / /N-

If J/ I 'K

Jn*m MiI2K

.rite U(ot Prime%

.rite UPrime (*m%

i iN0alse top tart

'<

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? mainJK V int n*m1/I21iW clrscrJKW printfJOXn :nter any n*m)er : OKW scanfJOMdO1Qn*mKW forJiI-Wi>In*mWiNNK V ifJJn*mMiKII2K /NNW Y ifJ/I I'K printfJOXn (*m)er Md is PGIM:O1n*mKW else printfJOXn (*m)er Md is (,T PGIM:O1n*mKW getchJKW Y

,*tp*t :
:nter any n*m)er : ; (*m)er ; is PGIM:

:nter any n*m)er : 3 (*m)er 3 is (,T PGIM:

'=

REVERSE O0 A NUMBER Aim :


To find the Ge"erse of a gi"en n*m)er.

Algorithm :
tep -: tart tep ': re"2 tep #: Gead n tep 3: n*mn tep 3: repeat *ntil Jn*m?2K tep 3.-: dign*mM-2 tep 3.': re"re"Z-2Ndig tep 3.#: n*mn*mD-2 tep $: .rite Ure"erse of the n*m)er is%1 re" tep 9: top.

#2

0low Chart :

tart re" 2

Gead n n*m n 0alse Tr*e

J n*m?2 K

.rite Ure"erse%1 re" top tart

dig n*mM-2 re" re"Z-2Ndig n*m n*mD-2

#-

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? mainJK V int n1n*m1dig1re"I2W clrscrJKW printfJOXn :nter any n*m)er : OKW scanfJOMdO1QnKW n*mInW whileJn*m?2K V digIn*mM-2W re"Ire"Z-2NdigW n*mIn*mD-2W Y printfJOXn Ge"erse of the gi"en Md is :: MdO1n1re"KW getchJKW Y

,*tp*t :
:nter any n*m)er : -'# Ge"erse of the gi"en -'# is :: #'-

#'

ARMSTRONG NUMBER (r NOT Aim :


To find that whether the gi"en n*m)er is Armstrong or (ot.

Algorithm :
tep -: tart tep ': s*m2 tep #: Gead n*m tep 3: d*pn*m tep 3: repeat *ntil Jn*m?2K tep 3.-: dign*mM-2 tep 3.': s*ms*mNJdigZdigZdigK tep 3.#: n*mn*mD-2 tep $: If Jd*pIs*mK then .rite U n*m)er is Armstrong % ,therwise1 .rite U n*m)er is (ot Armstrong% tep 9: top.

##

0low Chart :
tart s*m 2

Gead n*m d*p n*m 0alse 0alse d*p I s*m .rite U(ot Armstrong% .rite UArmstron g% Tr*e Tr*e

Jn*m?2K

dig n*mM-2 s*m s*mNdigZdigZdig n*m n*mD-2

top tart

#3

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? mainJK V int n*m1dig1d*p1s*mI2W clrscrJKW printfJOXn :nter any n*m)er : OKW scanfJOMdO1Qn*mKW d*pIn*mW whileJn*m?2K V digIn*mM-2W s*mIs*mNdigZdigZdigW n*mIn*mD-2W Y ifJd*pI Is*mK printfJOXn Md is an AGM TG,(6O1d*pKW else printfJOXn Md is (,T AGM TG,(6O1d*pKW getchJKW
Y

,*tp*t :
:nter any n*m)er : #'2 #'2 is (,T AGM TG,(6

:nter any n*m)er : -$# -$# is an AGM TG,(6

#$

0ACTORIAL O0 A NUMBER USING RECURSION Aim :


To find the 0actorial of a gi"en n*m)er *sing Gec*rsion.

Algorithm :
tep -: tart tep ': read n*m tep #: write U0actorial is U1 call Jfactorial Jn*mKK
tep 3: top

Algorithm for factorial 0*nction : tep -: tart tep ': if JnI-K then1 ret*rn otherwise1 tep '.-: factnZcallJfactorialJn+-KK tep '.': ret*rn fact

#9

0low Chart :
tart Gead n*m 0actorialJn*mK factorial .rite 0actorialJn*m K top

0low chart for factorial 0*nction :

tart 0alse If JnI-K 0act nZfactorialJn+ -K Get*rn JfactK Get*rn J-K Tr*e

#;

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? mainJK V int n*mW clrscrJKW printfJOXn :nter any n*m)er : OKW scanfJOMdO1Qn*mKW printfJOXn 0actorial of Md is :: MdO1n*m1factorialJn*mKKW getchJKW Y factorialJint nK V int factW ifJnII-K ret*rnJ-KW else factInZfactorialJn+-KW ret*rnJfactKW Y

,*tp*t :
:nter any n*m)er : 9 0actorial of 9 is :: ;'2

#<

0UNCTION PROTOT1PE Aim :


To find the 7*are of a gi"en n*m)er *sing 0*nction Prototype.

Algorithm :
tep -: tart tep ': read a tep #: )callJs7*areJaKK tep 3: write ) tep $: top. Algorithm for s7*are 0*nction : tep -: tart tep ': yJ&Z&K tep #: ret*rn y

#=

0low Chart :

tart Gead a ) s7*areJaK

.rite )

top

0low chart for s7*are 0*nction :

tart y &Z&

Get*rn JyK

32

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? mainJK V float a1)W float s7*areJfloatKW clrscrJKW printfJOXn :nter any n*m)er :OKW scanfJOMfO1QaKW )Is7*areJaKW printfJOXn s7*are of M.'f is M.'fO1a1)KW getchJKW Y float s7*areJfloat &K V float yW yI&Z&W ret*rnJyKW Y

,*tp*t :
:nter any n*m)er : $ 7*are of $.22 is '$.22

3-

0UNCTION 2 CALL B1 RE0ERENCE Aim :


Program to e&plain a)o*t the f*nction *sing Call )y Geference.

Algorithm :
tep -: tart tep ': a'21 )-$ tep #: write a1 ) tep 3: call f*nJa1)K tep $: write a1) tep 9: top Algorithm for f*n 0*nction : tep -: tart tep ': &#21 y-2 tep #: ret*rn

3'

0low Chart :

tart a '21 ) -$

.rite a1 ) 0*n JQa1 Q)K

.rite a1 )

top

0low chart for s7*are 0*nction :

tart & #21 y -2

Get*rn

3#

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? "oid mainJK V Void f*nJint Z1int ZKW int aI'21)I-$W printfJOXn 8efore calling f*nction XnOKW printfJOa I Md Xt ) I MdO1a1)KW f*nJQa1Q)KW printfJOXn After calling f*nction XnOKW printfJOa I Md Xt )I MdO1a1)KW getchJKW Y "oid f*nJint Z&1int ZyK V Z&I#2W ZyI-2W Y

,*tp*t :
8efore calling f*nction a I '2 ) I -$ After calling f*nction a I #2 )I -2

33

SORTING USING ARRA1S Aim :


Program for orting an array elements.

Algorithm :
tep -: tart tep ': read n tep #: for i2 repeat *ntil Ji>nK tep #.-: Gead aSiT tep #.': iiNtep 3: for i2 repeat *ntil Ji>nK tep 3.-: for CJiN-K repeat *ntil JC>nK tep 3.-.-: if JaSiT?aSCT K then tep 3.-.-.-: tempaSiT tep 3.-.-.': aSiTaSCT tep 3.-.-.#: aSCTtemp tep 3.-.': CCNtep 3.': iiNtep $: for i2 repeat *ntil Ji>nK tep $.-: .rite aSiT tep $.': iiNtep 9: top

3$

0low Chart :
tart Gead n 0or i 2 to Ji>nK 0alse Tr*e Gead aSiT i iN-

0alse Tr*e

0or i 2 to Ji>nK 0alse

0or i 2 to Ji>nK 0alse

Tr*e Tr*e 0alse If aSiT?aSCT Tr*e temp aSiT aSiT aSCT aSCT temp

0or C JiN-K to JC>nK

write aSiT i iN-

i iN-

top

C CN-

39

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? mainJK V int aS'2T1n1i1C1tempW clrscrJKW printfJOXn :nter array si!e : OKW scanfJOMdO1QnKW printfJOXn :nter array elements : OKW forJiI2Wi>nWiNNK scanfJOMdO1QaSiTKW forJiI2Wi>nWiNNK V forJCIJiN-KWC>nWCNNK V ifJaSiT?aSCTK V tempIaSiTW aSiTIaSCTW aSCTItempW Y Y Y printfJOXnXn orted array elements are : XtXnOKW forJiI2Wi>nWiNNK printfJOM$dO1aSiTKW getchJKW Y

,*tp*t :
:nter array si!e : $ :nter array elements : -' 9 $ # = orted array elements are : # $ 9 = -'

3;

MATRI3 MULTIPLICATION Aim :


.rite a program to perform Matri& M*ltiplication.

Algorithm :
tep -: tart tep ': read m1n tep #: if Jn[ImK then tep #.-: write Um*ltiplication is not possi)le% tep #.': goto tep < tep 3: for i2 repeat *ntil Ji>mK tep 3.-: for C2 repeat *ntil JC>nK tep 3.-.-: read aSiTSCT tep 3.-.': CCNtep 3.': iiNtep $: for i2 repeat *ntil Ji>mK tep $.-: for C2 repeat *ntil JC>nK tep $.-.-: read )SiTSCT tep $.-.': CCNtep $.': iiNtep 9: for i2 repeat *ntil Ji>mK tep 9.-: for C2 repeat *ntil JC>nK tep 9.-.-: cSiTSCT2 tep 9.-.': for /2 repeat *ntil J/>nK tep 9.-.'.-: cSiTSCTcSiTSCTNJaSiTS/TZ)S/TSCTK tep 9.-.'.': //Ntep 9.-.#: CCNtep 9.': iiNtep ;: for i2 repeat *ntil Ji>mK tep ;.-: for C2 repeat *ntil JC>nK tep ;.-.-: write cSiTSCT tep ;.-.': CCNtep ;.': iiNtep <: top.

3<

3=

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? mainJK V int aS'2TS'2T1)S'2TS'2T1cS'2TS'2T1m1n1i1C1/W clrscrJKW printfJOenter the order of first matri&XnOKW scanfJOMdMdO1Qm1QnKW ifJn[ImK V printfJOXn M*ltiplication is not possi)leOKW goto endW Y printfJOenter first matri&XnOKW forJiI2Wi>mWiNNK forJCI2WC>nWCNNK V printfJOXn :nter aSMdTSMdT elementsXnO1i1CKW scanfJOMdO1QaSiTSCTKW Y printfJOenter second matri&XnOKW forJiI2Wi>mWiNNK forJCI2WC>nWCNNK V printfJOXn:nter aSMdTSMdT elementsXnO1i1CKW scanfJOMdO1Q)SiTSCTKW Y forJiI2Wi>mWiNNK V forJCI2WC>nWCNNK V cSiTSCTI2W forJ/I2W/>nW/NNK cSiTSCTIcSiTSCTNJaSiTS/TZ)S/TSCTKW Y Y printfJUXn M*ltiplication Matri& is :: Xn%KW forJiI2Wi>mWiNNK V forJCI2WC>nWCNNK V printfJOMdXtO1cSiTSCTKW Y printfJOXnOKW $2

Y end: getchJKW Y

,*tp*t :
:nter the order of first matri& ' ' :nter first matri& :nter aS-TS-T elements' :nter aS-TS'T elements' :nter aS'TS-T elements' :nter aS'TS'T elements' :nter second matri& :nter aS-TS-T elements' :nter aS-TS'T elements' :nter aS'TS-T elements' :nter aS'TS'T elements' M*ltiplication Matri& is :: < < < <

$-

STRING LENGTH Aim :


To find the Length of the tring *sing and .itho*t *sing the tring f*nction.

Algorithm :
tep -: tart tep ': cnt2 tep #: read str tep 3: lenstrlenJstrK tep $: write len tep 9: for i2 repeat *ntil strSiT[I\X2\ tep 9.-: cntcntNtep 9.': iiNtep ;: write cnt tep <: top

$'

0low Chart :
tart cnt 2

Gead str len strlenJstrK write len

0or i 2 to JstrSiT[ I\X2\K 0alse .rite cnt

Tr*e

cnt cntN-

i iN-

top

$#

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? Fincl*de>string.h? mainJK V char strS#2TW int len1i1cntI2W clrscrJKW printfJO:nter the string :: XnOKW getsJstrKW lenIstrlenJstrKW printfJOXn5 I(6 05(CTI,( XnOKW printfJOThe length of the string is : MdXnXnO1lenKW printfJO.ITH ,5T 5 I(6 05(CTI,( XnOKW forJiI2WstrSiT[I]X2]WiNNK cntNNW printfJO(*m)er of characters is : MdO1cntKW getchJKW Y

,*tp*t :
:nter the string :: Arts College 5 I(6 05(CTI,( The length of the string is : '.ITH ,5T 5 I(6 05(CTI,( (*m)er of characters is : -'

$3

COMPARISION O0 STRINGS Aim :


To write a program to Compare two strings witho*t *sing string f*nction.

Algorithm :
tep -: tart tep ': read str-1str' tep #: for i2 repeat *ntil Jstr'SiT[I\X2\K tep #.-: if Jstr-SiTIstr'SiTK then1 iiNotherwise1 tep #.-: write Ustrings are (ot :7*al% tep #.': goto step $ tep 3: write Ustrings are :7*al% tep $: top.

$$

0low Chart :
tart

Gead tr-1 str' 0alse 0or i 2 to Jstr'SiT[ I\X2\K 0alse Tr*e

write Ue7*al %

write Unot e7*al%

If str-SiTIstr'SiT Tr*e i iN-

top

$9

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? Fincl*de>string.h? "oid mainJK V char str-S#2T1str'S#2TW int iW printfJOXn :nter first string : OKW getsJstr-KW printfJOXn :nter second string : OKW getsJstr'KW forJiI2Wstr'SiT[I]X2]W K V ifJstr-SiTIIstr'SiTK iNNW else V printfJOXn trings are (ot e7*alOKW e&itJKW Y Y printfJOXn trings are :7*alOKW Y

,*tp*t :
:nter first string : comp*ter :nter second string : comptter trings are (ot e7*al

:nter first string : this is :nter second string : this is trings are :7*al

$;

EMPLO1EE 4 STRUCTURE Aim :


To write a program to create employee details *sing str*ct*re.

Algorithm :
tep -: tart tep ': read n tep #: for i2 repeat *ntil Ji>nK tep #.-: read empSiT.eno1 empSiT.name1 empSiT.age tep #.': iiNtep 3: for i2 repeat *ntil Ji>nK tep 3.-: write empSiT.eno1 empSiT.name1 empSiT.age tep 3.': iiNtep $: top.

$<

0low Chart :
tart

Gead n 0alse 0or i 2 to Ji>nK Tr*e

0or i 2 to Ji>nK Tr*e top .rite empSiT.eno1 empSiT.name empSiT.age

Gead empSiT.eno1 empSiT.name empSiT.age

i iN-

i iN-

$=

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? str*ct employee V int enoW char nameS'2TW int ageW YW mainJK V str*ct employee empS-2TW int n1iW clrscrJKW printfJOXn :nter the n*m)er of employee: OKW scanfJOMdO1QnKW forJiI2Wi>nWiNNK V printfJOXn enter empno1empname1age for employee MdXnO1iKW scanfJOMdMsMdO1QempSiT.eno1empSiT.name1QempSiT.ageKW Y printfJOXn the company]s employee profile is as follows:XnOKW forJiI2Wi>nWiNNK V printfJOXn employee Md]s dataXn MdXtMsXtMdXnO1i1empSiT.eno1empSiT.name1empSiT.ageKW Y getchJKW Y

92

,*tp*t :
:nter the n*m)er of employee: ' enter empno1empname1age for employee -2raC* #3 enter empno1empname1age for employee ' -2' ram* #$ The company]s employee profile is as follows: employee -]s data -2- raC* #3 employee ']s data -2' ram* #$

9-

ARRA1 ELEMENTS USING POINTERS Aim :


To write a program to access the array elements thro*gh pointer.

Algorithm :
tep -: tart tep ': pa tep #: read n tep 3: for i2 repeat *ntil Ji>nK tep 3.-: read JpNiK tep 3.': iiNtep $: for i2 repeat *ntil Ji>nK tep $.-: write ZJpNiK tep $.': iiNtep 9: top

9'

0low Chart :
tart

pa

Gead n 0alse 0or i 2 to Ji>nK Tr*e Gead pNi 0or i 2 to Ji>nK 0alse Tr*e i iN-

.rite ZJpNiK i iN-

top

9#

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? "oid mainJK V int aS'2T1i1Zp1nW pIaW printfJOXn :nter array si!e : OKW scanfJOMdO1QnKW printfJO:nter array elements : XnOKW forJiI2Wi>nWiNNK scanfJOMdO1pNiKW printfJOXnXn Array elements are : XnOKW forJiI2Wi>nWiNNK printfJOMdXtO1ZJpNiKKW Y

,*tp*t :
:nter array si!e : $ :nter array elements : 9$ #' -2 '2 <= Array elements are : 9$ #' -2 '2

<=

93

STRUCTURE ELEMENTS USING POINTERS Aim :


To write a program to access the str*ct*re elements thro*gh pointer.

Algorithm :
tep -: tart tep ': read st*name1st*rollno1st*m-1st*m'1st*m# tep #: st*totst*m-Nst*m'Nst*m# tep 3: st*a"gst*totD# tep $: write st*name1st*rollno1st*tot1st*a"g tep 9: top

9$

0low Chart :
tart

Gead st*name1st*rolln o st*m-1st*m' st*m# st*totst*m-Nst*m'Nst*m# st*a"gst*totD# write st*name1st*rolln o st*tot1st*a"g top

99

o*rce Code :
Fincl*de>stdio.h? Fincl*de>conio.h? str*ct st*dent V char nameS#2TW int rollno1m-1m'1m#1totW float a"gW YW "oid mainJK V str*ct st*dent Zst*W printfJOXn :nter st*dent record as name1rollno Q # s*) mar/s : OKW getsJst*+?nameKW scanfJOMdMdMdMdO1Qst*+?rollno1Qst*+?m-1Qst*+?m'1Qst*+?m#KW st*+?totIst*+?m-Nst*+?m'Nst*+?m#W st*+?a"gIst*+?totD#W printfJOXnXn The st*dent record is :: XnOKW printfJOXn (ame I OKW p*tsJst*+?nameKW printfJOGollno I MdXntotal I MdXnA"erage I MfO1st*+?rollno1st*+?tot1st*+?a"gKW getchJKW Y

,*tp*t :
:nter st*dent record as name1rollno Q # s*) mar/s : an*sha -'3 '$ '# The st*dent record is :: (ame I an*sha Gollno I -total I ;' A"erage I 3.222222

9;

0ILES Aim :

9<

9=

Fincl*de>stdio.h? Fincl*de>conio.h? mainJK V 0IL: Zf-1Zf'1Zf#W int i1nW clrscrJKW f-IfopenJOInp*tO1OwOKW printfJOXn :nter the contents of a fileXnOKW forJiI-Wi>I-2WiNNK V scanfJOMdO1QnKW p*twJn1f-KW Y fcloseJf-KW f-IfopenJOInp*tO1OrOKW f'IfopenJO:"enO1OwOKW f#IfopenJO,ddO1OwOKW whileJJnIgetwJf-KK[I:,0K V ifJJnM'KII2K p*twJn1f'KW else p*twJn1f#KW Y fcloseJf-KW fcloseJf'KW fcloseJf#KW f-IfopenJOInp*tO1OrOKW printfJOXnContents of first file XnOKW whileJJnIgetwJf-KK[I:,0K V printfJOMdXtO1nKW Y fcloseJf-KW f'IfopenJO:"enO1OrOKW printfJOXn Contents of e"en fileXnOKW whileJJnIgetwJf'KK[I:,0K V printfJOMdXtO1nKW Y fcloseJf'KW f#IfopenJO,ddO1OrOKW ;2

printfJOXnContents of oddfile XnOKW whileJJnIgetwJf#KK[I:,0K V printfJOMdXtO1nKW Y fcloseJf#KW getchJKW Y

:nter the contents of a file -' 3 # 9 ;< $ # < = $9 Contents of first file -' 3 # 9 ;< $ $9 # < = $9

Contents of e"en file -' 3 9 ;< < Contents of oddfile # $ # =

;-

Вам также может понравиться