cplab manual.doc

74
  Department of Computer Science and Engineering V. S.B. Enginee ring Colleg e Kar ur-639 11 1 Computer Practice Laorator!-" La #anual $" Seme%ter& Prepared B! ' (.Sop)ia Pu%)parani De%ignation ' *%%t. Profe%%or Department ' Computer Science and Engineering  Prepared B! ' (.Sop)ia Pu%)parani De%ignation ' *%%t. Profe%%or Department ' Computer Science and Engineering

Upload: christopher-praveen-kumar

Post on 08-Oct-2015

55 views

Category:

Documents


0 download

TRANSCRIPT

  • 5/19/2018 cplab manual.doc

    1/74

    Department of

    Computer Science and Engineering

    V.S.B. Engineering CollegeKarur-639 111

    Computer

    Practice

    Laorator!-"

    La #anual

    $" Seme%ter&

    Prepared B! ' (.Sop)ia Pu%)paraniDe%ignation ' *%%t. Profe%%or

    Department ' Computer Science and

    Engineering

    Prepared B! ' (.Sop)ia Pu%)paraniDe%ignation ' *%%t. Profe%%or

    Department ' Computer Science and

    Engineering

  • 5/19/2018 cplab manual.doc

    2/74

    +*BLE , C,+E+S

    S.o E/erci%e Page.o

    1. Document Creation, Text Manipulation with Scientific

    Notations.

    2. Table Creation , Table Formatting an Con!ersion

    ". Mail Merge an #etter $reparation

    %. Drawing Flow Chart

    &. Chart ' #ine , (), *ar an $ie

    +. Formula Formula -itor

    .Sprea Sheet /nclusion of 0bects, $ictures an raphics,

    $rotecting the Document an Sheet3. Sorting

    4.

    a. Data T5pes,

    b. -xpressions -!aluation,

    c. Conitional Statements

    16. 7rra5s' Matrix Multiplication

    11. Structures an 8nions

    12. Functions

  • 5/19/2018 cplab manual.doc

    3/74

    E0.,' 1 D,C2#E+CE*+",4 +E0+#*"P2L*+",5"+

    D*+E' SC"E+""C,+*+",S

    *"#'

    To create a ocument an manipulate the text with specific notations using MS'office.

    *D5*E SPEC""C*+",S'

    1. Mother *oar 9 MS/

    2. $rocessor 9 7MD 7thlon :+% bit;

    ". am 9 +%6 M*

    &. Monitor 91&?inch

  • 5/19/2018 cplab manual.doc

    4/74

    ES2#E

    >aghul.

    %E16,Nehru Street, e'mail i 9 raghul!G5ahoo.co.inSalem'16. Mobile No.9 43+&%"216

    ,B(EC+"VE'

    To obtain a meaningful an challenging position which will enables me to become a

    recogniHe emplo5ee, face the challenges, ser!e the inustr5 with all m5 might an to learn an

    acIuire more practical =nowlege.

    ED2C*+",*L =2*L""C*+",'

    M.-. Computer Science with 3.+ C$7 in .S.*. -ngineering College,@arur.

    *.-. Computer Science with an aggregate of "J from .S.*. -ngineering College,

    @arur.

  • 5/19/2018 cplab manual.doc

    5/74

    PES,*L DE+*"LS'

    N7M- 9 >aghul.

    F7T?S N7M- 9 ishnu.>

    D7T- 0F */>T< 9 6+'6"'1433

    C0MM8N/C7T/0N

    7DD>-SS 9 %E16,Nehru Street,

    Salem'16.

    DECL**+",

    / hereb5 eclare that the abo!e etails are true to the best of m5 =nowlege.

    )ours

    >aghul.

  • 5/19/2018 cplab manual.doc

    6/74

    ?@ 2SE,SC"E+""C,+*+",S@?

    P,CED2E'

    1. 0pen a new ocument using ile 7e8option.

    . To create -Iuation using Scientific Notation, choose "n%ert7EAuation.

    3. T5pe the reIuire eIuation in the -Iuation tool using the scientific notations foun in

    EAuation tool7 De%ign.

    :. For sa!ing the ocument, press CT>#AS or clic= on sa!e button on stanar tool bar

    or select the sa!e option from the File menu.

    E=2*+",S'

    1.

    2. A K 1

    ".

    %.

    &.

    +.

  • 5/19/2018 cplab manual.doc

    7/74

    P*+"C2L*S * ,

    PERFORMANCE 2&

    VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

  • 5/19/2018 cplab manual.doc

    8/74

    ES2L+'

    Thus, the gi!en ocument has been create an manipulate using MS'office.

    E0., ' +*BLECE*+",4 ,#*++">*DC,VES",D*+E '

    *"#'To create, format an con!ert a table using MS'or.

    *D5*E SPEC""C*+",S'

    1. Mother *oar 9 MS/

    2. $rocessor 9 7MD 7thlon :+% bit;

    ". am 9 +%6 M*

    &. Monitor 91&?inch

  • 5/19/2018 cplab manual.doc

    9/74

    %. Now the table information is con!erte into text in a ocument.

    C& C,VE+">+E0++,+*BLE

    1. Select a table in a ocument.

    2. Choose the con!ert text to table option from the table menu.". Choose the separator of the text. Then clic= o=.

    %. Now the text information is con!erte into table in a ocument.

    D& S,+C,+E+S,+*BLE

    1. insert the table an t5pe the information

    2. Select the entire table an then choose sort option from the table menu.

    ". Choose column 2 for name wise sorting in the sort b5 list box.

    %. Then clic= on o=.

    &. Now the table contents are sorte.

    S*#PLE,2+P2+'

    *& +*BLECE*+",'

    S+2DE+S#*KL"S+

    S., *#E E>"S+E, +E-" E#-" EP-" EC-" E> ,C

    1.7L77>. 63+6661 46 34 3 3 4 32

    2.*7N8. 63+6662 3 + &+ 34 34 33

    ".D/N-S

  • 5/19/2018 cplab manual.doc

    10/74

    16.$>-M.M 63+6616 46 4 4& 3& 31 46

    B& C,VE+">+*BLE+,+E0+'

    S+2DE+S#*KL"S+

    S., *#E E>"S+E, +E-" E#-" EP-" EC-" E> ,C

    1 7L77>. 63+6661 46 34 3 3 4 322 *7N8. 63+6662 3 + &+ 34 34 33" D/N-S"S+E2#BE

    1. L7. 63+66+62. >/S/)7.S 63+66&

    D& S,+C,+E+S,+*BLE'

    S., *#E E>"S+E2#BE

  • 5/19/2018 cplab manual.doc

    11/74

    1. L7. 63+66+6

    2. >/S/)7.S 63+66&

    S,+ED+*BLE'

    S., *#E E>"S+E2#BE1. C7. 63+666&

    2. D0N7.- 63+6663

    ". /.S 63+6613

    %. >/S/T 63+66&"

    +. S7M/T7.T 63+66&+

    . S8>/)7.S 63+66&

    3. L7. 63+66+6

    P*+"C2L*S * ,

    PERFORMANCE 2&VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

  • 5/19/2018 cplab manual.doc

    12/74

    ES2L+'

    Thus, the gi!en table has been create an manipulate successfull5.

  • 5/19/2018 cplab manual.doc

    13/74

    E0., ' 3 #*"L#E>E*DLE++E PEP**+",D*+E '

    *"#'To sen an annual a5 in!itation for all the parents using Mail'Merge in MS'or.

    *D5*E SPEC""C*+",S'

    1. Mother *oar 9 MS/

    2. $rocessor 9 7MD 7thlon :+% bit;

    ". am 9 +%6 M*

    &. Monitor 91&?inch E "+,D2C+",

    The mail merge is use to prouce Iuic=l5 a personaliHe li=e for each mailing labels. The

    mail merge use main ocument an an aress ata file to prouce a merge ocument.

    There are three main components of merging process are main ocument, ata labels or

    ata sources, merge ocument.

    The main ocument contains bo5 of the letters. The main ocument consist file names

    an merge instructions. The basic information is in main ocument.

    The ata source has the information of the ata or labels that shoul be ae to

    ocument. These are mailing labels of each person.

    This merge ocument is the combine form of information from main ocument as well

    as ata sources.

    CE*+", , #*"L #E>E

    #*" D,C2#E+

    1. 0pen a new ocument.

    2. Select tools menu an select letter an mailing an select mail merge.

    ". The mail merge helper is use to pro!ie or show ata an mail message to be merge.

  • 5/19/2018 cplab manual.doc

    14/74

    %. The mail merge ialog box consists of three option main ocument, ata source, merge

    ata an ocument.

    &. 8ner the main ocument option create a letter using for on letter option.

    +. The form letter shows to use a new ocument or to select the opene winow.

    D*+* S,2CE CE*+",

    1. 7fter the creation of main ocument.

    2. Select t5pe a new list option.

    ". Clic= create option. The create ata source ialog box appears.

    %. Specif5 the fiel name in fiel names box an specif5 fiels? o be inclue in the main

    ocument.

    &. The fiel names can be ae an remo!e from the ocument.

    +. Clic= customiHe button. CustomiHe aress list ialog box appear.

    . Select one b5 one fiel name an Clic= remo!e button

    3. clic= a button an enter a fiel name an clic= o= button

    4. The foler where we want to sa!e ata source, t5pe name an clic= sa!e button.

    ED"+ *D "SE+ #E>E "ELDS

    1. The main ocument the text that appear can be eit at ata source.

    2. To insert merge fiels clic= the main ocument an clic= insert merge fiel on

    Mail merge tool bar

    ". 7fter inserting the fiels to be merge with main ocument clic= sa!e as on file

    menu an name the ocument to be sa!e.

    #E>E D,C2#E+

    1. clic= !iew merge ata in mail merge toolbar

    2. clic= merge to new ocument in mail merge tool bar

    ". Clic= merge all options for the recors to be merge an blan= line after ata source

    option shoul also be selecte.

    %. Now clic= merge button in mail merge ialog box. The merge letter appears as output.

  • 5/19/2018 cplab manual.doc

    15/74

    "V"+*+",

    From

    The $rincipal,

    .S.*. -ngineering College

    @arur.

    To

    FirstName

    7ress#ine1

    Cit5

    L/$Coe

    Dear sir,

    Su'/n!itation for 7nnual Da5 function >eg.

    /n our college, we are planne to celebrate the annual a5

    function on 12E16E2612 at 16.66 a.m. e in!ite 5ou for our 7NN87# D7) Function. $lease,

    grace with 5our presence on that a5.

    Than=ing 5ou

    $>/NC/$7#

  • 5/19/2018 cplab manual.doc

    16/74

    "V"+*+",From

    The $rincipal,

    .S.*. -ngineering College

    @arur.

    To

    >aa

    "1, anhi Nagar

    Nama==al

    +"661

    Dear sir,

    Su'/n!itation for 7nnual Da5 function >eg.

    /n our college, we are planne to celebrate the annual a5

    function on 12E16E2612 at 16.66 a.m. e in!ite 5ou for our 7NN87# D7) Function.

    $lease, grace with 5our presence on that a5.

    Than=ing 5ou

    $>/NC/$7#

  • 5/19/2018 cplab manual.doc

    17/74

    "V"+*+",

    From

    The $rincipal,

    .S.*. -ngineering College@arur.

    To

    >.Si!a

    12%, anapathi Nagar

    Chennai

    +"661

    Dear sir,

    Su'/n!itation for 7nnual Da5 function >eg.

    /n our college, we are planne to celebrate the annual a5

    function on 12E16E2612 at 16.66 a.m. e in!ite 5ou for our 7NN87# D7) Function.

    $lease, grace with 5our presence on that a5.

    Than=ing 5ou

    $>/NC/$7#

  • 5/19/2018 cplab manual.doc

    18/74

    "V"+*+",

    From

    The $rincipal,

    .S.*. -ngineering College

    @arur.

    To

    S.>agul

    %E1, anhipuramCoimbatore

    +"%12

    Dear sir,

    Su'/n!itation for 7nnual Da5 function >eg.

    /n our college, we are planne to celebrate the annual

    a5 function on 12E16E2612 at 16.66 a.m. e in!ite 5ou for our 7NN87# D7)Function. $lease, grace with 5our presence on that a5.

    Than=ing 5ou

    $>/NC/$7#

  • 5/19/2018 cplab manual.doc

    19/74

    P*+"C2L*S * ,

    PERFORMANCE 2&

    VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

    ES2L+'

    Thus, the gi!en ocument has been create an sent successfull5.

  • 5/19/2018 cplab manual.doc

    20/74

    E0., ' : D*5"> L,5C*+S

    D*+E '

    *"#'

    To raw a flowchart using rawing toolbar in MS'0>D.

    *D5*E SPEC""C*+",S'

    1. Mother *oar 9 MS/

    2. $rocessor 9 7MD 7thlon :+% bit;

    ". am 9 +%6 M*

    &. Monitor 91&?inch

  • 5/19/2018 cplab manual.doc

    21/74

    &

    S*#PLE L,5C*+

    ead a4

    "f

    a

    Start

    Di%pla!

    a

    Di%pla!

    e% o

  • 5/19/2018 cplab manual.doc

    22/74

    P*+"C2L*S * ,

    PERFORMANCE 2&

    VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

    +

  • 5/19/2018 cplab manual.doc

    23/74

    ES2L+'

    Thus, the gi!en flowchart has been rawn successfull5.

    E0.,'; C*+ L"E4 04 B* *D P"E

    D*+E'

    *"#'To prepare the #ine, (), *ar an $ie Charts in MS'-xcel.

    *D5*E SPEC""C*+",S'

    1. Mother *oar 9 MS/

    2. $rocessor 9 7MD 7thlon :+% bit;". am 9 +%6 M*

    &. Monitor 91&?inch

  • 5/19/2018 cplab manual.doc

    24/74

    ". Shows the chart wiHar step 1 of % chart t5pe ialog box.

    %. Choose the appropriate chart t5pe from the chart t5pe list box then clic= next.

    &. Shows the chart wiHar step 2 of % chart source ata ialog box, then clic= next.

    +. Shows the chart wiHar step " of % chart options ialog box, here 5ou can gi!e theChart title. :i; ( an ) axis title etc., then clic= next.

    . Shows the chart wiHar step % of % chart location ialog box then clic= finish.

    B* C*+'

    ,2+P2+'

    3

  • 5/19/2018 cplab manual.doc

    25/74

    L"E C*+'

    ,2+P2+'

    4

  • 5/19/2018 cplab manual.doc

    26/74

    0 C*+'

    ,2+P2+'

    16

  • 5/19/2018 cplab manual.doc

    27/74

    P"E C*+'

    11

  • 5/19/2018 cplab manual.doc

    28/74

    ,2+P2+'

    12

  • 5/19/2018 cplab manual.doc

    29/74

    P*+"C2L*S * ,

    PERFORMANCE 2&

    VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

    ES2L+'

    Thus, the !arious charts has been create successfull5.

    E0., ' 6 ,#2L*-,#2L* ED"+,

    D*+E '

    *"#' To calculate sum, a!erage, maximum, minimum an count through formula eitor forthe stuent mar=list using sprea sheet.

    *D5*E SPEC""C*+",S'

    1. Mother *oar 9 MS/

    2. $rocessor 9 7MD 7thlon :+% bit;

    ". am 9 +%6 M*&. Monitor 91&?inch

  • 5/19/2018 cplab manual.doc

    30/74

    1. MS'0ffice

    P,CED2E'

    1. To enter Microsoft -xcel, clic= QstartR button then clic= QprogramR from

    QprogramsR menu then clic= QMicrosoft -xcelR.

    2. For opening a new wor=sheet o the following. Clic= QfileR menu from the menubar. From this file menu clic= QnewR option .This will ispla5 the new wor=sheet.

    ". -nter the stuent name, roll no an mar=s of all the subects.

    %. $lace the cursor in the current cell, t5peKsum:first mar= 9last mar=;

    &. $lace the cursor in the current cell, t5peKa!erage:first mar= 9last mar=;

    +. $lace the cursor in the current cell, t5peKcount:first mar= 9last mar=;

    . $lace the cursor in the current cell, t5peKmax:first mar= 9last mar=;

    3. $lace the cursor in the current cell, t5peKmin:first mar= 9last mar=;

    4. Cop5 the formula for the remaining stuents.

    16. Now the entire table is rea5 in spreasheet.

    ,2+P2+'

    1%

  • 5/19/2018 cplab manual.doc

    31/74

    1&

  • 5/19/2018 cplab manual.doc

    32/74

    1+

  • 5/19/2018 cplab manual.doc

    33/74

    P*+"C2L*S * ,

    PERFORMANCE 2&

    VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

    ES2L+'

    Thus, the spreasheet was create to appl5 the formula eitor for calculating

    sum, a!erage, maximum, minimum, an count of stuent mar= list.

    E0., ' < SPE*D SEE+-"CL2S", , ,B(EC+S 4 P"C+2E

    *D

    D*+E ' P,+EC+"> +E D,C2#E+ *D SEE+

    *"#'

    To insert a picture an protecting the ocument an sheet in MS'-xcel.

    *D5*E SPEC""C*+",S'

    1. Mother *oar 9 MS/

    2. $rocessor 9 7MD 7thlon :+% bit;". am 9 +%6 M*

    &. Monitor 91&?inch

  • 5/19/2018 cplab manual.doc

    34/74

    +. @e5boar 9

  • 5/19/2018 cplab manual.doc

    35/74

    ,2+P2+'

    *& "SE+"> P"C+2E " +E 5,KSEE+'

    14

  • 5/19/2018 cplab manual.doc

    36/74

    B& "SE+"> P"C+2E " +E 5,KSEE+'

    26

  • 5/19/2018 cplab manual.doc

    37/74

    C& SEE+P,+EC+",'

    21

  • 5/19/2018 cplab manual.doc

    38/74

    22

  • 5/19/2018 cplab manual.doc

    39/74

    P*+"C2L*S * ,

    PERFORMANCE 2&

    VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

    ES2L+'

    Thus, the gi!en picture has been inserte an then concern wor=sheet hasbeen protecte successfull5.

    E0. ,'F S,+"> *D "#P,+?E0P,+ E*+2ESD*+E '

    *"#'To write a C program to arrange names in alphabetical orer.

    *D5*E SPEC""C*+",S'

    1. Mother *oar 9 MS/

    2. $rocessor 9 7MD 7thlon :+% bit;

    ". am 9 +%6 M*

    &. Monitor 91&?inch

  • 5/19/2018 cplab manual.doc

    40/74

    *L>,"+#'

    1. To enter microsoft excel, clic= QstartR button then clic= QprogramR from

    QprogramsR menu then clic= Qmicrosoft excelR.

    2. -nter the stuents information in iferent columns.

    ". clic= Data sort option on the sort an filter group, it shows the sort

    ialogue box. launch the sort ialogue box to sort ata base on se!eral criteria

    at once.

    %. Clic= sort option on the sort an filter group, new osrt winow will appear.

    &. 7fter the rows, place the cursor in the list in the wor=sheet.

    +. Clic= ata sort option on the sort an filter group, it shows the sort

    ialogue box.

    . /n the sort b5 column rop own list select N7M- of the stuent an then

    clic= o=.

    3. 7gain sort b5 column clic= >- N0from then b5 rop own list.

    4. The rows are sort now, epening on the N7M- an >-N0.

    "#P,+1. /f we ha!e alrea5 entere the list of items we want to use as a series, select

    the list on the wor=sheet.

    2. 0n the ata menu get external ata group from ata source or other

    ata source li=e from S# ser!er, from (M# ata etc.

    ". Now the select ata source winow ialogue box appears.

    %. Select the particular file name to import an then clic= open.

    &. Now the reIuire file has been importe into spreasheet.

    ,2+P2+'

    S,+'

    2%

  • 5/19/2018 cplab manual.doc

    41/74

    2&

  • 5/19/2018 cplab manual.doc

    42/74

    2+

  • 5/19/2018 cplab manual.doc

    43/74

    "L+E'

    2

  • 5/19/2018 cplab manual.doc

    44/74

    23

  • 5/19/2018 cplab manual.doc

    45/74

    P*+"C2L*S * ,

    PERFORMANCE 2&

    VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

    ES2L+'

    Thus, the gi!en program has been execute successfull5.

    24

  • 5/19/2018 cplab manual.doc

    46/74

    E0. ,'9a D*+*+PESD*+E '

    *"#'

    To rite a C program to fin the siHe of the ata t5pes.

    *D5*E SPEC""C*+",S'

    1. Mother *oar 9 MS/2. $rocessor 9 7MD 7thlon :+% bit;

    ". am 9 +%6 M*&. Monitor 91&?inch

  • 5/19/2018 cplab manual.doc

    47/74

    L,5C*+'

    S,2CEC,DE'

    UincluePstio.hO

    UincluePconio.hO

    UincluePstring.hO

    !oi main:;Vint aW

    float bW

    char cKX8XWchar Y16ZW

    clrscr:;W

    printf:Q[n-NT-> T

  • 5/19/2018 cplab manual.doc

    48/74

    printf:Q[n[n aKR;W

    scanf:QJR,]a;W

    printf:Q[n[n bKR;Wscanf:QJfR,]b;W

    printf:^[n-nter character string[n^;W

    printf:Q[n[ncKR;W scanf:^Js^,;W

    printf:Q[n[n siHeof:J;KJ b5tesR,a,siHeof:a;;Wprintf:Q[n[n siHeof:Jf;KJ b5tesR,b,siHeof:b;;Wprintf:Q[n[n siHeof:Jc;KJ b5tesR,c,siHeof:c;;W

    printf:^[n[n siHeof:XcX;KJ b5tes^,siHeof:XcX;;W

    printf:^[n[n siHeof:Js;KJ b5tes^,,siHeof:;;W

    getch:;W_

    ,2+P2+'

    -NT-> T

  • 5/19/2018 cplab manual.doc

    49/74

    E0. ,'9 E0PESS",EV*L2*+",D*+E '

    *"#'

    To rite a C program to e!aluate the gi!en expression r K a ` :b c; E A e.

    *D5*E SPEC""C*+",S'

    1. Mother *oar 9 MS/2. $rocessor 9 7MD 7thlon :+% bit;

    ". am 9 +%6 M*&. Monitor 91&?inch

  • 5/19/2018 cplab manual.doc

    50/74

    L,5C*+'

    S,2CEC,DE'

    Uinclue Pstio.hO

    Uinclue Pconio.hO

    !oi main:;

    V

    float a,b,c,,e,rW

    clrscr:;W

    printf:^[n[n -nter the !alues of a,b,c,,e[n[n^;W

    "%

    Con!erting a,b,c,,e in float

    atat5pe to float of floatingpoint 2

    Start

    -nter the !alue ofa,b,c,,e

    Stop

    Displa5 r

    CalculaterK a ` :b ' c; E A e

  • 5/19/2018 cplab manual.doc

    51/74

    scanf:^Jf Jf Jf Jf Jf^,]a,]b,]c,],]e;W

    printf:^[n[na K J.2f[n^,a;Wprintf:^[n[nb K J.2f[n^,b;W

    printf:^[n[nc K J.2f[n^,c;W

    printf:^[n[n K J.2f[n^,;Wprintf:^[n[ne K J.2f[n^,e;W

    printf:^[n[na ` :b ' c; E A e[n[n^;Wr K a ` :b ' c; E A eW

    printf:^[nJ.2f ` :J.2f ' J.2f; E J.2f A J.2f K J.2f^,a,b,c,,e,r;Wgetch:;W

    _

    ,2+P2+'

    -nter the !alues of a,b,c,,e& 2 + 3 4

    a K &.66

    b K 2.66

    c K +.66

    K 3.66

    e K 4.66

    a ` :b ' c; E A e

    &.66 ` :2.66 ' +.66; E 3.66 A 4.66 K +.&6

    "&

  • 5/19/2018 cplab manual.doc

    52/74

    E0.,' 9C C,D+",*LS+*+E#E+D*+E'

    *"#'

    To write a C program to chec= the largest number among gi!en three numbers.

    *D5*E SPEC""C*+",S'

    1. Mother *oar 9 MS/2. $rocessor 9 7MD 7thlon :+% bit;

    ". am 9 +%6 M*&. Monitor 91&?inch

  • 5/19/2018 cplab manual.doc

    53/74

    L,5C*+'

    T>8- F7#S-

    T>8- F7#S-

    S,2CEC,DE'

    UincluePstio.hO

    UincluePconio.hO

    !oi main:;

    V

    int a,b,cWclrscr:;W

    printf:^[n-nter an5 three numbers 9 ^;W

    scanf:^J J J^, ]a, ]b, ]c ;W

    "

    ST7>T

    /nput a, b, c

    /f aOb]]aOc

    /fbOc

    7 is great * is great C is great

    Stop

  • 5/19/2018 cplab manual.doc

    54/74

    if:a O b ]] a O c; printf:^[n[n J is the largest number[n^,a;W

    else if:b O c;

    printf:^[n[n J is the largest number[n^,b;Welse

    printf:^[n[n J is the largest number[n^,c;Wgetch:;W

    _

    ,2+P2+'

    ,2+P2+'1

    -nter an5 three numbers 9 16 1& +6

    +6 is the largest number

    ,2+P2+'

    -nter an5 three numbers 9 26 & %

    26 is the largest number

    ,2+P2+'3

    6..6..-nter an5 three numbers 9 26 &6 2+

    &6 is the largest number

    "3

  • 5/19/2018 cplab manual.doc

    55/74

    P*+"C2L*S * ,

    PERFORMANCE 2&

    VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

    ES2L+'

    Thus, the Data t5pe, -xpression -!aluation, Conitional Statements has been

    execute successfull5.

    "4

  • 5/19/2018 cplab manual.doc

    56/74

    E0. ,' 1 ** - #*+"0#2L+"PL"C*+",D*+E '

    *"#'To write a C program to implement the Matrix multiplication.

    *D5*ESPEC""C*+",S'

    1. Mother *oar 9 MS/

    2. $rocessor 9 7MD 7thlon :+% bit;". am 9 +%6 M*

    &. Monitor 91&?inch

  • 5/19/2018 cplab manual.doc

    57/74

    L,5C*+

    )esETrue

    False ENo

    )esETrue

    %1

    iK6

    Start

    Declare aYiZYZ,bYiZYZ,cYiZ

    YZ,i , , =

    -nter

    \7?

    Matrix

    K6

    >ea aYiZ

    YZ

    $rint \[n?

    /fP"

    /f

    iP"

    BAA

    /AA

  • 5/19/2018 cplab manual.doc

    58/74

    False ENo

    )esETrue

    False ENo

    )esETrue

    False ENo

    %2

    iK6

    K6

    AA

    iAA

    >ea bYiZYZ

    $rint \[n?

    /f

    P"

    /fiP"

    -nter \*?

    Matrix

    $rint

    M7T>/(

    M8#T/$#/C7T/0N

    a

    a

    iK6

  • 5/19/2018 cplab manual.doc

    59/74

    )esETrue

    False ENo

    )esETrue

    False ENo

    )esETrue

    False ENo

    %"

    K6

    CYiZ

    YZK6

    =K6

    CYiZYZKcYiZYZAaYiZYZ`bYiZYZ

    /f=P"

    /f

    P"

    =AA

    BAA

    /f

    iP"

    iAA

    b

    b

  • 5/19/2018 cplab manual.doc

    60/74

    )esETrue

    False ENo

    )esETrue

    False ENo

    %%

    c

    c

    iK6

    K6

    Displa5 cYiZYZ

    $rint \[n? ?[n?

    Stop

    /f P"

    /f iP"

    iAA

    iAA

  • 5/19/2018 cplab manual.doc

    61/74

    S,2CEC,DE'

    UincluePstio.hOUincluePconio.hO!oi main:;

    V

    int aY"ZY"Z,bY"ZY"Z,cY"ZY"Z,i,,=W

    clrscr:;Wprintf:^[n-NT-> X7XM7T>/([n^;W

    for:iK6WiP"WiAA;

    Vfor:K6WP"WAA;

    V

    scanf:^J^,]aYiZYZ;W_

    printf:^[n^;W

    _printf:^[n-NT-> X*XM7T>/([n^;W

    for:iK6WiP"WiAA;

    V

    for:K6WP"WAA;V

    scanf:^J^,]bYiZYZ;W

    _

    printf:^[n^;W_

    printf:^[n[n^;Wprintf:^M7T>/( M8#T/$#/C7T/0N[n^;W

    printf:^[n[n^;W

    for:iK6WiP"WiAA;

    Vfor:K6WP"WAA;

    V

    cYiZYZK6Wfor:=K6W=P"W=AA;

    VcYiZYZKcYiZYZAaYiZY=Z`bY=ZYZW_

    _

    _for:iK6WiP"WiAA;

    V

    for:K6WP"WAA;

    %&

  • 5/19/2018 cplab manual.doc

    62/74

    V

    printf:^J[t^,cYiZYZ;W

    _printf:^[n[n^;W

    _

    getch:;W_

    ,2+P2+'

    -NT-> X7XM7T>/(

    1 1 1

    2 2 2

    " " "

    -NT-> X*XM7T>/(

    1 2 "

    1 2 "

    1 2 "

    M7T>/( M8#T/$#/C7T/0N

    " + 4

    + 12 13

    %+

  • 5/19/2018 cplab manual.doc

    63/74

    4 13 2

    P*+"C2L*S * ,

    PERFORMANCE 2&

    VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

    ES2L+'

    %

  • 5/19/2018 cplab manual.doc

    64/74

    Thus, the gi!en program has been execute successfull5.

    E0.,'11 S+2C+2E*D2",SD*+E'

    *"#'To prepare the mar= sheet of \n? stuents using structures an to write a C program

    using 8nion.

    *D5*E SPEC""C*+",S'

    3. Mother *oar 9 MS/

    4. $rocessor 9 7MD 7thlon :+% bit;16. am 9 +%6 M*

    12. Monitor 91&?inch Tea Name, >.No,

    m1,m2,m"iPn /AA

    $rint ST8D-NTD-T7/#S

  • 5/19/2018 cplab manual.doc

    65/74

    ES?+2E

    ,?*LSE

    ES?+2E

    %4

    >ea n

    -NT-> N7M-, >N07ND M7>@S

    iK6

    >ea Name, >.No,

    m1,m2,m"

    iAA

    $rint ST8D-NTD-T7/#S

    iK6

    cYiZ.totKcYiZ.m1AcYiZ.m2AcYiZ.m"AcYiZ.m%W

    cYiZ.a!gK:cYiZ.tot;E%W

    $rint Name, >.No,m1,m2,m", tot, a!g

    iAA

    aa

    /f

    iPn

    /f

    iPn

  • 5/19/2018 cplab manual.doc

    66/74

    ,?*LSE

    S,2CEC,DE'

    UincluePstio.hO

    UincluePconio.hO

    struct stuent

    V

    char nameY26ZWint rnoW

    _sW

    struct cseV

    int m1W

    int m2W

    int m"Wint m%W

    int totW

    float a!gWstruct stuent sW

    _cY16ZW

    !oi main:;V

    int i,nW

    clrscr:;Wprintf:^-NT-> T N7M-,>N0 7ND M7>@S [n[n^;W

    for:iK6WiPnWiAA;V

    scanf:^JsJ^,cYiZ.s.name, ]cYiZ.s.rno;W

    scanf:^J^,]cYiZ.m1;Wscanf:^J^,]cYiZ.m2;W

    scanf:^J^,]cYiZ.m";W

    scanf:^J^,]cYiZ.m%;W_

    printf:^[n[n[n^;W

    printf:^[t[t``````````````````ST8D-NT D-T7/#S```````````````[n^;Wprintf:^[t''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''[n^;W

    printf:^[tN7M-[t>N0[tM1[tM2[tM"[tM%[tT0T7#[t7->7-[n^;W

    printf:^[t''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''[n^;W

    for:iK6WiPnWiAA;V

    cYiZ.totKcYiZ.m1AcYiZ.m2AcYiZ.m"AcYiZ.m%W

    cYiZ.a!gK:cYiZ.tot;E%W

    &6

    Stop

  • 5/19/2018 cplab manual.doc

    67/74

    printf:^[tJs[tJ[tJ[tJ[tJ[tJ[tJ[tJ.2f[n[n^,cYiZ.s.name,cYiZ.s.rno,cYiZ.m1,

    cYiZ.m2,cYiZ.m",cYiZ.m%,cYiZ.tot,cYiZ.a!g;W

    _printf:^[t''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''[n^;W

    getch:;W

    _

    ,2+P2+'

    -NT-> T N7M-,>N0 7ND M7>@S

    Sugir

    2"

    4&

    3&3&

    4&

    Bai

    1243

    43

    3

    43```````````````````````ST8D-NT D-T7/#S``````````````````

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''N7M- >N0 M1 M2 M" M% T0T7# 7->7-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    Sugi 2" 4& 3& 3& 4& "+6 46.66

    Bai 12 43 43 3 43 "2 4".66

    &1

  • 5/19/2018 cplab manual.doc

    68/74

    ?@@P,>*# , 2",@@?

    *L>,"+#'

    S+EP-1' Start the program. S+EP-' Defining the 8nion stuent with members.

    S+EP-3'Declare the necessar5 !ariables

    S+EP-;'>ea the !alues eclare for the !ariables. S+EP-6'8sing reference the !alue is eclare to the !ariables.

    S+EP-

  • 5/19/2018 cplab manual.doc

    69/74

    S,2CEC,DE'

    UincluePstio.hO

    UincluePconio.hOunion stuent

    V

    int aW

    char bY2ZW

    _cW

    !oi main:;

    V

    c.aK2&+W

    printf:Q[n alues 0f c.a is K JR ,c.a;Wprint:Q[n alues 0f c.bY6ZKJR,c.bY6Z;W

    printf:Q[n alues 0f c.bY1ZKJR,c.bY1Z;W

    getch:;W

    _

    ,2+P2+'

    alue 0f c.a is K 2&+

    alue 0f c.bY6Z K 6

    alue 0f c.bY1Z K 1

    &"

  • 5/19/2018 cplab manual.doc

    70/74

    P*+"C2L*S * ,

    PERFORMANCE 2&

    VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

    ES2L+'

    Thus, the gi!en program has been execute successfull5.

    &%

  • 5/19/2018 cplab manual.doc

    71/74

    E0.,'1

    D*+E' 2C+",S-"B,*CC"SE"ES

    *"#'To write a program in C

    i; To print the Fibonacci series

    *L>,"+#'

    Step'19Start

    Step'29>ea the input !ariable \n?

    Step'"9Call function fib:n;

    Step'%9Stop.

    2C+",'

    Step'19aK6,bK1

    Step'29print a, b

    Step'"9for:iK6WiPnWiAA;

    Step'"'19cKaAb

    Step'"'29aKb

    Step'"'"9bKa

    Step'"'%9prin c

    Step'%9stop

    &&

  • 5/19/2018 cplab manual.doc

    72/74

    L,5C*+'

    ,?*LSE

    ES?+2E

    &+

    S+*+

    S+,P

    Enter ionacci Limit4

    n

    "f iGn

    "nitialiHe aI4I1

    print a4

    "nitialiHe iI

    calculate

    cIaJ

    aI

    Ic

    iJJ

    print c

  • 5/19/2018 cplab manual.doc

    73/74

    S,2CEC,DE'

    UincluePstio.hOUincluePconio.hO

    !oi main:;

    Vint a,b,nW

    clrscr:;W

    printf:^[n -nter the Fibonacci Series #imit[n^;Wscanf:^J^,]n;W

    fib:n;W

    getch:;W

    _

    int fib:int n;V

    int a,b,c,iW

    aK6WbK1W

    printf:^[n F/*0N7CC/ S->/-S[n^;W

    printf:^[nJ[nJ^,a,b;Wfor:iK6WiPnWiAA;

    V cKaAbW

    aKbW bKcW

    printf:^[nJ^,c;W

    _return 6W

    _

    ,2+P2+'

    -nter Fibonacci Series #imit9&

    F/*0N7CC/ S->/-S9

    &

  • 5/19/2018 cplab manual.doc

    74/74

    6 1 1 2 "

    P*+"C2L*S * ,

    PERFORMANCE 2&

    VIVAVOCE 16

    RECORD 1&

    TOTAL ;

    *'7##0T-D, ,'0*T7/N-D

    ES2L+'Thus, the gi!en program has been execute successfull5.

    &3