You are on page 1of 47

GE2115 COMPUTER PRACTICE LABORATORY I

LIST OF EXERCISES


a) Word Processing 15

1. Document creation, Text manipulation with Scientific notations.
2. Table creation, Table formatting and Conversion.
3. ail merge and !etter preparation.
". Drawing # flow Chart

b) Spread Sheet 15

$. Chart # !ine, %&, 'ar and (ie.
). *ormula # formula editor.
+. Spread sheet # inclusion of ob,ect, (icture and graphics, protecting the document and sheet.
-. Sorting and .mport / 0xport features.

Simple C Programming ` 15

1. Data t2pes, 0xpression 0valuation, Condition Statements.
13. 4rra2s
11. Structures and 5nions
12. *unctions
TOTAL: 45 PERIODS

6 *or programming exercises *low chart and pseudocode are essential



HARDWARE / SOFTWARE REQUIRED FOR A BATCH OF 30 STUDENTS


Hardware

1 !47 S2stem with 33 nodes 89:; Standalone (Cs < 33 7os.
2 (rinters < 3 7os.

Software

1 9S < =indows / 57.% Clone
2 4pplication (ac>age < 9ffice suite
3 Compiler < C
INDEX
1
Sl.No List Of Programs
MS WORD
1 A) Document Creation, Text Manipulation With
Scientific Notations.
B) Advertisement In Word
2 A) Table Creation And Table Formatting
B) Table Conversion
3 Mail Merge And Letter Preparation
4 Flow Chart
MS EXCEL
5 Chart In Spread Sheet
6 A) Formula Editor
B) To Create A Examination Database
7 A) Inclusion Of Objects, Pictures And Graphics
B) Protecting Sheets And Documents
8 Sorting And Import /Export Features
C - PROGRAMS
9 SIMPLE C PROGRAMS
a) To find the Area of the circle.
b) To find the Addition of two numbers.
c) To find the given number is Positive or Negative.
d) To find the Given number is Armstrong or not.
e) To find sum and product for given two values.
f) To generate Fibonacci Series.
g) To find the sum of digits.
h) To find the student result calculations.
10 USING CONTROL STRUCTURE
To find the roots of Quadratic equation.
11 USING SWITCH CASE
2
To write a menu driven program to find
i. Factorial of the given number.
ii. Prime number or not
iii. Even number or Odd number.
12 USING ARRAYS
a) To perform matrix addition
b) To perform matrix Multiplication
13 USING STRING HANDLING FUNCTIONS
a)To find given string is palindrome or not
b)Conversion of Uppercase to Lowercase & Lowercase to Uppercase
14 USING FUNCTIONS
a) To perform Arithmetic operations (call by value).
b) To perform swapping of two numbers (call by reference).
15 USING STRUCTURE
To Perform Student Result Calculation
16 USING UNION
To perform Employee Net salary Calculation
3
INTRODUCTION TO MS-WORD
S#=9:D is a word processing program that allows us to create documents such as letters,
reports, manuals and newsletters etc. =ord provides man2 features that ma>e it eas2 for creating
professional loo>ing documents. The option provided b2 s#=ord are explained below.
ENTERING AND EDITING TEXT :
1. =ord offers the following features. =e can add or delete text.
2. :earrange paragraphs and chec> for spelling and grammar mista>es.
3. =ord remembers the last changes we have made to a document, so that we can undo or cancel.
". =e can save a word document for further use.
$. .f there is an2 confidential in formation, we can protect that document using personal
(4SS=9:D. .t provides prevention from other people from opening or modif2ing the
document.
VIEWING DOCUMENTS :
The view of a document can be changed in different views to ma>e the document easier to edit
and wor> with. =ord offers four different wa2s to view a document.
7ormal ?iew Simplifies the document so that we
can @uic>l2 enter, edit and format text
9utline !a2out and 9utline ?iews These views are useful for organiAing
the content and structure of a large
document.
(age !a2out ?iew Displa2s the document on the screen
exactl2 as it appear on a printed page.
.t displa2s margins of the document.
=e can use Aoom feature to view a document in detail or displa2 more of a document on
the screen at once.
FORMATTING TEXT :
"
*ormatting is the process of changing the appearance of text in a document.
*ont siAes, st2les and colors ?arious t2pes of fonts, st2les and
colors help us to enhance the
appearance of text.
!ine Spacing =e can change the amount of space
between the lines of text.
4lignment =e can align the text in three
different wa2s. 8i.e., left, corner,
right.;
Tabs =e can line up information in
columns b2 using these tabs.
'ullets and 7umbering This feature is ver2 useful to separate
items in a list b2 beginning each item
with a bullet or number.
FORMATTING DOCUMENTS ;
=ords formatting feature is used to determine how the document is printed in a page. =e can
change the margins for the document, center text on a page or specif2 whether the page can be printed
either in portrait or landscape orientation.
(age 7umbers and (age 'orders =e can add page 7umbers and page
borders to a document.
*ootnotes and 0ndnotes This feature allows us to provide
additional information about text in a
document.
Beaders and *ooters This is used to insert or displa2
information in header/ footer pane of
the document.
PRINTING :
$
4fter finishing the process of editing and formatting a document, we can produce a paper cop2
of the document. =e can preview the document before printing to see it on the screen exactl2 what the
hard cop2 will loo> li>e. =e can also use word to create and print envelopes and mailing labels.
TABLES :
Tables are used to organiAe and neatl2 displa2 information in a document in the form of rows
and columns. =ord allows us to draw a table on the screen as we would draw a table with a pen and
paper.
There are man2 wa2s that we can enhance the appearance of a table, such as changing the cell
borders, adding shades to cells and changing the position of text in cells. =ord also offers built in user
designs that are used to enhance the appearance of the table.
GRAPHICS :
=ord provides man2 t2pes of graphics to enhance the appearance of a document. Craphics such
as text effects, 4uto shapes and professionall2 designed clipart can help ma>e a document more
interesting and draw attention to important information.
4fter adding graphics, we can further enhance the document b2 wrapping text around the
graphics.
MAIL MERGE AND LABELING :
The mail merge and labeling features in s#=ord provides us to @uic>l2 produce personaliAed
letters and mailing labels for each person on a mailing list. This is useful to send the same document
8such as an announcement, change of address, notification or advertisement; to man2 people.
HOW TO START MICROSOFT WORD :
To start icrosoft =ord, do the following clic> on
start programsMicrosoft Word and then clic>.
1.(a) DOCUMENT CREATION, TEXT MANIPULATION WITH
)
SCIENTIFIC NOTATIONS.
AIM :
To create a document and perform the following operations using s#word.
Steps to be followed :
1. 9pen a new Document and perform the following tas>s.
a. Dustif2 the Text
b. a>e some of the Text as 'old t2pe.
c. Correct the spellings.
d. 5nderline and ma>e .talic st2le for some words.
9pen a new document using *ile 7ew option and t2pe text.
*or ,ustification select the entire text in the document. Then select the 1ustify button
on the formatting tool bar, now 2our selected text is ,ustified.
*or 'old *ace or .talic of the words, select the word 2ou want to change into bold
face. Then select the Bold / Italic button on the formatting tool bar, now 2our
selected text is changed to either 'old or .talic.
*or spelling corrections, select the word 2ou want to correct, then right clic> the
mouse or clic> Spelling and Grammar button on the standard tool bar.
*or saving the document, clic> on save button on standard tool bar or select the save
option on File menu. Then it shows the Save As dialog box. Choose a suitable file
name in *ile 7ame text box, then clic> Save button on Save As dialog box. 7ow the
document is saved under a given name.
2. a>e 4lignment for the following Text.8S.4 0ngineering College;
8i; *or Left Alignment press CTRL+L or press Align Left button on the
Formatting toolbar.
8ii; *or Right Alignment press CTRL+E or press Align Right button on the
Formatting tool bar.
3. 4dd the 'ullets and numbering as shown below.
o Computer Software
+
o T2pes 9f Software
o Software Development Steps
o .nternet 0volution
o 'asic .nternet Terminolog2
o Cetting connected to .nternet 4pplications
8i; Select the text where 2ou want to add Bullets and numberings.
8ii; Then clic> Bullets button on the formatting tool bar or choose Bullets and numbering
option from the Format menu. .t shows the Bullets and numbering dialog box as shown
below.
8iii; Choose re@uired 'ullet from the Bullet Tab for 'ullets.
8iv; Choose Numbering button on the Formatting tool bar or choose re@uired number series
from the Numbered tab in the Bullets and Numbering dialog box.
". Change the !ine spacing as 1.$ for the whole text in a document
i. Select All option from the Edit menu or b2 pressing CTRL+A
ii. Choose Paragraph option from the Format menu selection. 4 paragraph box
iii. Select the 1.$ !ines from the Line Spacing list box, then clic> OK.
iv. 7ow the 1.$ line spacing is applied to the selected paragraph.
$. To add box on the entire text, do the following stepsE
8i; Choose Select All option from Edit menu or b2 pressing CTRL+A.
8ii; 7ow the total text of the document will be highlighted.
8iii; Clic> Border icon in Formatting tool bar.
8iv; Then clic> outside the text to de#select it. 7ow 2ou will see the entire text in a
box.
). Changing the different t2pes of *ont t2pes and siAes.
i. Select the text 2ou want to change for font t2pes and SiAes.
ii. Then choose Font option from the Format menu.
iii. .t shows the Font dialog box, as shown below.
iv. Choose the re@uired Font typefrom the Font drop down list box and the
re@uired size list box on the Font dialog box. Then Clic> OK.
+. .nserting S2mbols
i. T2pe the text, then put the cursor where 2ou want to add the s2mbol.
-
ii. Choose S2mbols option from the .nsert enu 'ar.
iii. Shows the s2mbols dialog box. Then choose the appropriate *ont t2pe.
iv. 87ormall2 for s2mbols =ebdings *ont;.
-. To add 4nimation to the T0%T
i. T2pe the text in the document.
ii. Select the text to which 2ou want to add animation.
iii. Choose Format->Font option
iv. .t displa2s the *ont dialog box, choose Text Effects tab.
v. .t shows the different 4nimations t2pe.
vi. Choose the re@uired one, then clic> OK.
vii. 7ow the text that is selected is shown in 4nimation st2le.
1. Changing text into different cases
i. Select the text 2ou want to change.
ii. Then choose the Change Case option from the Format enu.
iii. The Change Case dialog box appears.
iv. Bere 2ou can choose different cases for the selected text.
13. ?isiting Card
i. 9pen a new document.
ii. Clic> on the Page setup option from the File enu.
iii. Clic> on Paper Size tab, set the Width and Height and Clic> OK button.
iv. (osition the cursor and clic> Format->Font and select the appropriate font
t2pe and siAe.
v. 0nter the details given such as name, phone number , 0#mail. =ebsite.
vi. Clic> File->Save.
RESULT :
Thus a document is created and the following operations are performed using s#word.
1b) ADVERTISEMENT IN WORD
1
AIM :
To Create an advertisement in word
PROCEDURE :
*or Creating a document , select File menu bar then choose New option
o *or ,ustification, select the text to be ,ustified in the document and then press the 1ustify button
in the formatted tool bar.
o *or bold face of the word, select the text to change them into bold face in the document and then
press the button B in the formatted tool bar.
o *or spelling correction and grammar chec>ing, select the word to be spell corrected, and then
clic> ABC button on the standard tool bar.
o *or changing the text st2le into italic, select the word and then press the button I in the tool bar.
o *irst t2pe the title of the advertisement F format it using above steps.
o *or Themes, select Format, then go to Themes F select an2 themes from the list.
o To insert picture, select Insert, then Picture, from the clip art collection cop2 an2 picture.
o To use word art, select Insert->Picture->Word art
13
OUTPUT :
S.A. ENGINEERING COLLEGE , CHENNAI 77. S.A. ENGINEERING COLLEGE , CHENNAI 77.
ADMISSIONS 2009-10
Aggregate marks in Maths, Physics & Chemistry.
RESULT :
Thus the advertisement is created in word document.

EX.NO.2A TABLE CREATION AND TABLE FORMATING
11
1.COMPUTER SCIENCE&ENGG
2. MECHANICAL ENGG
3. ELECTRICAL & ELECTRONICS
4. INFORMATION TECHNOLOGY
5. CIVIL ENGG
Eligibility
60
AIM:
To create a table using s#=ord..
STEPS TO BE FOLLOWED:
ST0( 1E ove the cursor to the place where 2ou want the new table.
ST0( 2E Choose insert table from table new.
ST0( 3E Specif2 the number of rows and columns that is four rows and four columns.
ST0( "E Clic> on 9G button.
ST0( $E Change the column width as per re@uirement and t2pe the re@uired data.
ST0( )E Choose fond command from format menu.
ST0( +E 5sing either the >e2board arrows or the mouse pointer select a font which 2ou li>e
the best.
ST0( -E Clic> 9G button.
ST0( 1E To bold, highlight the heading and then clic> once on bold icon.
ST0( 13E Bighlight the text b2 placing the mouse in the beginning of the text, clic> once. Geep
left button of the mouse pressed and drag the mouse till the end of the text. :elease
the mouse button.
ST0( 11E Clic> on center icon to center the text across the page width.
ST0( 12E (lace the cursor in the place where we want to find total and goto tools and clic>
formula.
ST0( 13E Clic> 9G.
RESULT:
Thus the table with rows and columns was created successfull2.
EX.NO.2B TABLE CONVERSION
AIM:
12
To convert a series of text into a table and vice versa.
STEPS TO BE FOLLOWED:
CONVERT TABLE TO TEXT:
ST0( 1E Select a table in a document.
ST0( 2E Choose the convert table to text option from the table menu.
ST0( 3E 7ow the convert table dialog box appears.
ST0( "E Choose the separator of the text. Then clic> 9G.
ST0( $E 7ow the table information is converted into text in a document.
CONVERT TEXT TO TABLE:
ST0( 1E Select the text in the document.
ST0( 2E Choose the convert#text to table option from the table menu.
ST0( 3E 7ow the convert text to table dialog box appears.
ST0( "E Choose the table siAe and separator text option. Then clic> 9G.
ST0( $E 7ow the text information is converted into a table.
RESULT:
Thus a series of strings was converted into a table and vice versa.
EX.NO. 3 MAIL MERGE AND LETTER PREPERATION
AIM:
To create a mail merge for the given letter.
STEPS TO BE FOLLOWED:
13
ST0( 1E Select file option in the menu bar and clic> new, to open a new document.
ST0( 2E *rom tools menu select the mail merge.
ST0( 3E .t shows the mail merge helper dialog box.
ST0( "E .n the main document area of mail merge helper dialog box, clic> on create button, it shows
the available option.
ST0( $E Select *orm !etters from the pull down menu of create button.
ST0( )E Clic> on 4ctive =indow button in S#=ord dialog box.
ST0( +E .n the ail erge Belper dialog box, clic> Cet data button.
ST0( -E Select Create Data Source to get create Data source dialog box.
ST0( 1E Select the appropriate fields from the *ield from the *ield names in the header row drop down
list box or add new fields b2 t2ping the field name in the field box and clic> on 4dd *ield 7ame.
ST0( 13E :emove the unwanted field b2 clic>ing the :emove *ield name.
ST0( 11E Clic> 9G, now the Save 4s dialog box appears to save the data source.
ST0( 12E T2pe the appropriate name for the data source then clic> 9G.
ST0( 13E .t shows the dialog box as>ing to add records to the data base.
ST0( 1"E Clic> on 0dit Data source to add records to the data source.
ST0( 1$E .t shows the data form dialog box, add records to the data source.
ST0( 1)E Then clic> 9G, the mail merge tool bar is automaticall2 displa2ed in the main
document.
ST0( 1+E Clic> on the .nsert erge *ield on the mail merge tool bar.
ST0( 1-E Select the desired fields from the drop down menu of insert merge field.
ST0( 11E 4fter inserting the merge fields, choose tools ##H mail merge.
ST0( 23E ail merge Belper dialog box opens, clic> merge then clic> on merge button to
create a new document. 7ow the main document and data is merged into new
document.
RESULT:
Thus a mail merge was created successfull2.
EX.NO.4 FLOW CHART
AIM:
To draw a flow chart to add two numbers.
1"
STEPS TO BE FOLLOWED:
ST0( 1E Choose flow chart option in the auto shapes menu of the drawing tool bar.
ST0( 2E Choose the appropriate flow chart s2mbol then drag the s2mbol in the document.
ST0( 3E T2pe the text in the s2mbol b2 right clic>, then choose add text.
ST0( "E 5sing the arrow button line st2le button in the drawing tool bar draw the lines
connecting to the different flow chart s2mbol.
ST0( $E Select all the flow chart s2mbols and lines in the document using the select ob,ect
button then right choose grouping, then clic> on group.
ST0( )E 7ow all the flow chart s2mbols are grouped into one and the flow chart for addition is
achieved.
RESULT:
Thus a flow chart to add two numbers was drawn in S#=ord successfull2.
INTRODUCTION TO MS-EXCEL
1$
icrosoft excel is the most widel2 used and versatile spreadsheets pac>age and helps us to organiAe
the data into lists and then summariAe, compare and present the data graphicall2. .t has the user interface
features common to other icrosoft 9ffice applications.
0xcel allows us
1. To enter an edit data in a wor>sheet.
2. To use functions and formulae to calculate and anal2Ae data.
3. to create colorful charts and graphs.
". To save time b2 combining a series of commands into a single command b2 using 4C:9S.
$. (rovides tools that are used to manage and anal2Ae a large amount of data into a list.
Bow to start icrosoft 0xcelI
To start icrosoft 0xcel, do the following
Start ############H (rograms icrosoft 0xcel.
4 blan> untitled spreadsheet opens.
PARTS OF SPREADSHEETS:
Columns:
Columns are vertical lines of cells. The2 are named from 4 to J afterwards 44 to 4J, '4 to 'J and
so on up to .?. There are 2$) columns available in spreadsheet.
Rows:
:ows are horiAontal lines of cells. 4 number identifies each row from 1 to 3$$3). There are 3$$3)
rows available in spreadsheet.
Cells:
4 cell is the point where the row and the column intersect. The width of cell spaces can be altered to
suit the application.
Cell pointer:
.t is a highlighted cell boundar2 that specifies which cell is active at that moment.
1)
Data:
Data is nothing but Text, 7umbers, 4lphanumeric and Dates. =e can enter data into the wor>sheet
easil2, the data which is currentl2 t2ped appears in the active cell and the in the formula bar at the top of
wor>sheet.
Types of Data
Data in spreadsheets can be divided into the following.
7umbers These are the numbers from 3#1
Text These ma2 be an2 text or alphanumeric characters.
*ormulae *ormulae are nothing but mathematical expressions. 4ll formulae
contain operators.
9perators These are the s2mbols that are used to carr2 out a particular tas>s on
the operands.
There are three t2pes of operatorsE
1. Arithmetic Operators:
These are used to perform basic mathematical operations and to combine numeric values and
produce result. The following are 7umeric 9perators.
Operations Meaning
K 4ddition
# Subtractions
6 ultiplication
/ Division
L 0xponentiation
2. Logical Operators:
These are used to compare two values and produce a logical result either True or *alse 38Aero; or
18one;. The following are the logical operators.
Operation Meaning
M 0@ual
H Creater than
1+
N !ess than
HM Creater than or 0@ual to
NM !ess than or 0@ual to
NH 7ot e@ual to
3. Text Operators:
This operator is used to ,oin two or more text values to produce a single combined text values.
9peration eaning
F Concatenation
Working with worksheet:
Creating a new worksheet
Creating a new wor>sheet is the process of creating new wor>sheet in S#0xcel. To create a new
wor>sheet, do the following.
1. Clic> on the file########H 7ew option. 7ow new dialog box appears.
2. Choose wor>boo> on general tab and then clic> 9G.
3. 7ow a t2pical wor>boo> opens.
Entering data in the worksheet:
=0 can enter data into the wor>sheet b2 t2ping at the active cell, after pressing
N07T0:H >e2 the next cell becomes active. =e can use arrow >e2s to move from one cell to another.
Saving the worksheet:
Saving is the process of retaining the data for the further purpose.
*ollow these steps to save the wor>sheet.
1-
1. *rom the file#####H Save or Save 4s option.
2. 7ow Save 4s dialog box appears.
3. T2pe the name of the file in the file name area.
". Then clic> Save button to save the file.
EX.NO.5 CHART IN SPREAD SHEET
AIM:
To create 'ar Chart, !ine Chart and (ie chart from the given data.
STEPS TO BE FOLLOWED:
ST0( 1E T2pe the given data in the wor> sheet.
ST0( 2E Clic> at cell address 41.Clic> .nsert ##H Chart.
ST0( 3E 0xcel will displa2 the first dialog box of chart wiAard.
ST0( "E Select the 'ar Craph and Clic> on 7ext.
11
ST0( $E Clic> on Data :ange from the Chart =iAard dialog box.
ST0( )E Select 41 to 0), then clic> next.
ST0( +E Clic> in the Chart title box, t2pe 4'C compan2.
ST0( -E Clic> on the categor2 %#4xis, t2pe &04:S.
ST0( 1E Clic> on the value &#4xis t2pe (:9D5CTS.
ST0( 13E Clic> next and then clic> *.7.SB.
ST0( 11E 0xcel will displa2 the created chart.
ST0( 12E .n the same wa2, repeat the steps for creating !ine Chart and (ie Chart.
RESULT:
Thus the bar chart, line chart and pie chart have been created successfull2.

EX.NO.6A FORMULA EDITOR
AIM:
To calculate B:4, D4, T4, (*, C(*, !.C, Cross salar2 deductions, 7et Salar2 for the given data
in a wor> sheet.
STEPS TO BE FOLLOWED:
ST0( 1E *or B:4 put the cell pointer in D2 and press M8e@ual to; for entering the formula. Then choose
the C2 cell 8basic salar2; and t2pe 68multiplication operator; and t2pe 1-O then press enter. 7ow the
1-O B:4 form '4S.C is calculated.
ST0( 2E Then drag that formula for entire records.
23
ST0( 3E *or T4 put the cell pointer in 02 and press M 8e@ual to; for entering the formula the choose the
C2 cell 8'asic salar2; and t2pe 6 8multiplication operator; and 1$O then press enter.
ST0( "E 7ow the 1$O T4 from 'asic is calculated. Then drag that formula for entire records.
ST0( $E *ollow the above steps for calculation of D4, (*, C(*, !.C.
ST0( )E *or CS 8Cross Salar2;E put the cell pointer in the D2 and choose the M, then clic> on C2 cell K
clic> on D2 K clic> on 02 K clic> on *2 and press enter. 7ow the Cross salar2 is calculated.
ST0( +E Drag all the cell.
ST0( -E *ollow the above step for DD and 7S calculations.
ST0( 1E 4fter all calculations, select all the data in wor> sheet , then choose Data ##H Sort, from the sort
dialog box, choose 7ame for the sort order.
RESULT:
Thus B:4, D4, T4, (*, C(*, !.C, Cross Salar2, Deduction 7et salar2 for given data is
calculated.
EX NO: 6B TO CREATE A EXAMINATION DATABASE
4.E
Create a suitable examination database and find the sum of the mar>s 8total; of each student and
the respective classes secured b2 the students.
:5!0SE 1. (4SS if mar>s in each sub,ect HM3$
2. *4.! if mar>s in an2 sub,ect is N3$
3. Distinction if average HM+$
". *irst Class if average HM)3 but less than +$
$. Second class if average HM$3 but less than )3
). Third class if average HM3$ but less than $3
Displa2 average mar>s of the class sub,ect#wise and pass percentages.
21
7ame ar>1 ar>2 ar>3 Total 4verage
Barsh
Barini
:ishi
STEPS TO BE FOLLOWED:
To *ind the sum of the mar>s
1. 0nter the Student 7ame, ar>s in three sub,ects
2. (lace the cursor in 02, t2pe M SUM(B2..D3)
3. (lace the cursor in *2, t2pe MAVERAGE(B2..D3)
". Clic> on C2, t2pe M IF(OR(B2<35,C2<35,D2<35) ,~FAIL,IF(F2>75,
~DISTINCTION, IF(F2>60, ~FIRST CLASS, IF(F2>50, ~SECOND CLASS,
THIRDCLASS))))
$. Cop2 the formulae to the remaining students.
RESULT:
Thus the examination database was created successfull2.
EX NO: 7A INCLUSION OF OB1ECTS, PICTURES AND
GRAPHICS
AIM:
To insert ob,ects, pictures and comment into the wor>sheet using S#0%C0!.
Steps to be followed:
1. .nserting 9b,ects in the =or>sheets.
1. There are so man2 ob,ects that can be inserted into the wor>sheets
2. Choose Objects option in the Insert menu.
3. Choose Picture option from the Insert enu.
22
". Choose appropriate ob,ect from the Auto shape menu of the Drawing toolbar.
2. .nserting a picture
1. Choose (icture option in the .nsert enu.
2. Then choose from file option.
3. 7ow the .nsert (icture dialog box is shown
". 7avigate and choose the picture to the insert into the wor>sheet
$. Then clic> on Insert button.
). 7ow the selected in inserted into the wor>sheet.
3. .nserting Comments in the =or>sheet

1. Comments are helpful for identif2ing the elements in the Craph
2. Select the Cell in which comment to be added.
3. Choose Comments option in the .nset enu.
". 7ow the Comment portion of the particular cell is edited
$. Then t2pe the comments for the cell.
). Clic> on the outside of the comment.
+. =henever 2ou place the cell pointer in that cell, the comment is automaticall2
shown.
". .nserting a *unctionE

1. Clic> on Paste Function f
x
button in the Standard Toolbar or choose Function
option in the Insert menu.
2. 7ow the (aste *unction dialog box is shown with the functions available in the
s#0xcel.
3. Choose the re@uired function, the clic> on 9G.
". 7ow the re@uired function is edited and added to the wor>sheet.
$. 9pen the number of wor>boo>s at a timeE
1. 9pen number of wor>sheets in the same wor>boo>
23
2. then choose Window-> Arrange., it shows that Arrange Windows dialog box,
as shown below.
3. Choose Cascade option from the Arrange Windows dialog box.
". 7ow all the wor>sheets are cascaded in the current wor>boo>.
). Show the =or>sheet in 3D effectE
9pen the =or>sheet, using File-> Open option
1. 7ow it opens the selected wor>sheet
2. Select the data range in the wor>sheet
3. 7ow choose Format-> Autoformat.
". 7ow it shows the AutoFormat dialog box
$. Clic> on the 3D Effects autoformat.
+. 7ow the wor>sheet is shown in 3D format st2le.
RESULT:
Thus the ob,ects, pictures and comments are inserted into the wor>sheet
successfull2 using S#0%C0!
EX.NO.7B PROTECTING SHEETS AND DOCUMENTS
AIM:
To protect a sheet and document in S#0xcel.
STEPS TO BE FOLLOWED:
ST0( 1E Clic> on cell which 2ou want to protect.
ST0( 2E Choose Tools --> protection, then choose Protect Sheet. .t shows protect sheet
book dialog box as>ing the password to protect sheet.
ST0( 3E T2pe the password clic> and 9G. Then it as>s for confirmation password box. T2pe
the same password again and then clic> 9G.
ST0( "E 7ow the sheet is under protection.
ST0( $E .f 2ou clic> on an2 cell to t2pe then the following message box appears b2 specif2ing
the sheet under protection.
2"
ST0( )E To remove protection, choose tools --> protection --> unprotect sheet, then t2pe the
password to unprotect.
ST0( +E 7ow the sheet can be unprotected.
ST0( -E *ollow the same procedure b2 choosing the tools --> Protection --> protect work
book option to protect the wor>boo>.
PROTECTING THE WORKBOOK :
ST0( 1 E 9pen the wor>boo> to protect.
ST0( 2E Choose Tools --> protection, then choose Protect Workbook. .t shows protect
Workbook dialog box as>ing the password to protect sheet.
ST0( 3E T2pe the password and clic> 9G. Then it as>s for confirmation password box. T2pe
the same password again and then clic> 9G.
ST0( "E 7ow the sheet is under protection.
ST0( $E .f 2ou clic> on an2 cell to t2pe then the following message box appears b2 specif2ing
the sheet under protection.
ST0( )E To remove protection, choose tools --> protection --> unprotect sheet, then t2pe the
password to unprotect.
ST0( +E 7ow the sheet can be unprotected.
ST0( -E *ollow the same procedure b2 choosing the tools --> Protection --> protect work
book option to protect the wor>boo>.
2$
RESULT: Thus the protection of sheet and wor>boo> in s#0xcel is done successfull2.
EX.NO.8 SORTING AND IMPORT /EXPORT FEATURES
AIM :
To 0nter the following data into the =or>boo> using the Data *orm Command.
STEPS TO BE FOLLOWED :
Step 1 E 0nter the 7ame , Department, Salar2 in different columns.
Step 2 E Clic> Data *orm option, it shows the form as shown below.
Step 3 E Clic> New button in the Form to add the rows to the list.
Step " E 4fter adding the rows, place the cursor in the list in the wor>sheet.
Step $ E Clic> Data Sort, it shows the Sort dialog box, as shown below.
Step ) E .n the Sort by drop down list select Dept, clic> OK.
Step + E 4gain in Sort, clic> Salary from Then By drop down list.
Step - E The rows are sorted now, depending on the DEPT and SALARY.
Step 1 E Clic> Data FilterAutoFilter , it shows an arrow at each field.
2)
Step 13E 9n the Dept clic> the icon select Accounts.
Step 11 EThe list of rows which belongs to Accounts is displa2ed.
Step 12 E (lace the cursor in 41$, find the sum using S5 formula.
Step 13 E .n the same wa2 find each departments total salar2.
TO CALCULATE THE SUBTOTALS :
Step 1 E T2pe the list in a wor>sheet with column as Salesman, (roduct, Sales.
Step 2 E Select all, then sort the Sales Column to add Subtotals.
Step 3 E Clic> DataSubtotals.
Step " E The Subtotal dialog box appears.
Step $ E Select the column name from At each change in drop down list box to add subtotals.
Step ) E 5se the Sum function from the 5se function drop down listbox.
Step + E Select the field names 8Sales, (roduct; from the Add Subtotals to drop down list box.
Step - E Clic> OK to add subtotals to the list.
Step 1 E 7ow the list displa2s the subtotals and a grand total.
RESULT :
Thus the following data is sorted successfull2 using s#0xcel.
9 a) FIND THE AREA AND CIRCUMSTANCE OF THE CIRCLE
AIM:
To write a program to find the area and circumstance of the circle.
ALGORITHM:

Step 1E Start the program.
Step 2E .nput the radius of the circle.
Step 3E *ind the area and circumstance of the circle using the formulae
4reaM3.1"6r6r
CircumM263.1"6r
Step "E (rint the area and the circum of the circle.
Step $E Stop.
SAMPLE OUTPUT:
2+
0nter the radius of the circle $
4reaM+-.$33333
CircumferenceM31."33333
RESULT:
Thus the 4rea and circumference of circle performed using C.
9 b) ADDITION OF TWO NUMBERS
AIM:
To find the 4ddition of two numbers.
ALGORITHM:
Step 1E Start the program.
Step 2E Declare the variables of respective data t2pe.
a,b,c#Hinteger
Step 3E Cet the value for b F c.
Step "E Calculate aMbKc
Step $E (rint the a#addition of two numbers.
Step )E Stop.
2-
SAMPLE OUTPUT:
0nter the two numbersE
13
23
4ddition M 33
RESULT:
Thus the 4ddition of two numbers performed using C.
9 c) FIND THE GIVEN NUMBER IS POSITIVE OR NEGATIVE
AIM:
To write a program in C to find the given value is positive or negative.
ALGORITHM:

Step 1E Start the program.
Step 2E :ead the value of PnQ.
Step 3E Chec> whether PnQ is greater than Aero or not.
Step "E .f step#3 is True. (rint (ositive.
Step $E .f step#3 is *alse. (rint 7egative.
Step )E Stop.
21
SAMPLE OUTPUT:
0nter the numberE -1
The given number -1 is positive.
RESULT:
Thus the given value is positive or negative performed using C.
9 d) FIND THE GIVEN NUMBER IS ARMSTRONG OR NOT
AIM:
To write a program in C to find the number is 4rmstrong or not.
ALGORITHM:

Step 1E Start the program.
Step 2E :ead the value of PaQ.
Step 3E 4ssign value PaQ to the variable PeQ..
Step "E Chec> whether the value of PaQ is greater than Aero or not.
Step $E .f step#" is True, do step#) to step#13.
Step )E Compute b M aO13.
Step +E Compute c M b6b6b.
Step -E Compute a M a/13.
Step 1E Compute d M c K d.
Step 13E goto step#".
33
Step 11E .f step#" is *alse, do the following steps.
Step 12E Chec> the value of PeQ is e@ual to value of PdQ.
Step 13E .f step#12 is True, print 4rmstrong.
Step 1"E .f step#12 is *alse, print 7ot 4rmstrong.
Step 1$E Stop.
SAMPLE OUTPUT:
0nter the numberE 1$3 1$3 is an 4rmstrong number.
0nter the numberE 123 123 is not an 4rmstrong number.
RESULT:
Thus the given number is 4rmstrong or not performed using C.
9 e) FIND THE SUM AND PRODUCT OF TWO NUMBERS
AIM:
To write a program in C to find the sum and product.
ALGORITHM:

Step 1E Start the program.
Step 2E :ead input values to c,d.
Step 3E Compute sum M cKd.
Step "E Compute product M c6d.
Step $E (rint the values of sum, product.
Step )E Stop.
31
SAMPLE OUTPUT:
0nter the valueE + 1
The sum is 1) and (roduct is )3
RESULT:
Thus the given number is sum and product performed using C.
9 f) TO GENERATE FIBONACCI SERIES
AIM:
To write a program to generate fibonocci series
ALGORITHM:
Step 1E Start the program.
Step 2E 0nter the number.
Step 3E Chec> the number whether the number is Aero or not.
.f Aero print Aero. .f not Aero go further.
Step "E Set a loop upto the given number.
Step $E fib M fibKaR
aMbR
bMcR
Step )E 0ver2 increment in the loop prints the value of fib.
Step +E Stop.
32
SAMPLE OUTPUT:

0nter the number $
*ibonacci Series
3 1 1 2 3
RESULT:
Thus the *ibonacci series generated using C.
9 g) SUM OF DIGITS
AIM:
To write a program to find sum of digits
ALGORITHM:
Step 1E Start the program.
Step 2E Declare the variables of respective data t2pe.
n,r,sum#Hinteger.
Step 3E Set sumM3
Step "E .f nH3 then
Step $E Calculate rMnO13
SumMsumKr
nMn/13
Step )E (rint sum
Step +E Stop
33
SAMPLE OUTPUT:

0nter the numberE 12
Sum of digits M3
RESULT:
Thus the sum of digits performed using C.
9 h) STUDENT RESULT CALCULATION
AIM:
To write a program to perform student result calculation
ALGORITHM:
Step 1E Start the program.
Step 2E Declare the variables name, id no., mar>1, mar>2, mar>3. of
respective data t2pe.
Step 3E Declare the variables Total, 4verage, Crade of respective data t2pe.
Step "E Cet the values for name, id no., mar>1, mar>2, mar>3.
Step $E Calculate the total mar> and average.
Step )E if the 4verage is above )3, then Crade 4.
if the 4verage is above $3 F below )3, then Crade '.
if the 4verage is below )3, then Crade C.
Step +E (rint the values of name, id no., mar>1, mar>2, mar>3, Total,
4verage, Crade respectivel2.
Step -E Stop
3"
SAMPLE OUTPUT:
0nter the student no E 331
0nter the student name E Dohn
0nter the 1st sub,ect mar>E 133
0nter the 2nd sub,ect mar>E $)
0nter the 3rd sub,ect mar>E -3
ST5D07T D0T4.!S
6666666 6666666
Student 7umber E1
Student 7ame EDohn
1st Sub,ect ar>E133
2nd Sub,ect ar>E$)
3rd Sub,ect ar>E-3
T9T4! M23) 4?0:4C0M+-.333333 D.ST.7CT.97
RESULT:
Thus the student result calculation performed using C.
10. ROOTS OF QUADRATIC EQUATION
AIM:

To write a c program to find roots of @uadratic e@uation
ALGORITHM:

Step 1E Start the program.
Step 2E 0nter the value of a,b,c
Step 3E *ind the value of d b2 using the formula
dMb6b#"6a6c

Step "E .f d is greater then or e@ual to Aero then find the two root as
root1M8#bKs@rt8d;;/826a;R
root2M8#b#s@rt8d;;/826a;R
(rint the two roots
Step $E .f d is greater then or e@ual to Aero then print the statement the roots are imaginar2.

Step )E Stop
3$
SAMPLE OUTPUT:
0nter the values of a,b,c 1 3 #1
The roots of the values aM1,bM3,cM1 are 3.333333 3.333333

RESULT:
Thus the roots of @uadratic e@uation performed using C.
11. SWITCH CASE PROGRAM
AIM:
To write a menu driven program to find
1. *actorial of the given number
2. (rime number or not
3. 0ven number or odd number
". 0xit

ALGORITHM:

Step 1E Start
Step 2E :ead num
Step 3E 0nter 2our choice using switch statement
Step "E .f 2our choice 1.*ind the *actorical
Step $E set a loop up to the entered number
Step )E Calculate factorial factMfact6i
Step +E (rint the factorial value
3)
Step -E .f 2our choice 2.*ind the whether the number is prime r not
Step 1E set a loop up to number#1
Step 13E Chec> the number is divide b2 an2 number other than one and the number itself
Step 11E .f divide absolutel2 then print the number is not a prime
Step 12E .f not divide other than one and itself then print the number is prime
Step 13E .f 2our choice 3.*ind the whether the number is odd or even
Step 1"E .f the number is divide b2 2 then print the number is even
Step 1$E .f the number is not dividing b2 2 then print the number is odd
Step 1)E .f 2ou choose the choice ".0xit the program
SAMPLE OUTPUT:
0nter the numberS.$
Choose one of the options given below
1. *actorial of the given number
2. (rime number or not
3. 9dd or 0ven
". 0xit
1
The factorial of $ is 123
0nter the numberS.$
Choose one of the options given below
1. *actorial of the given number
2. (rime number or not
3. 9dd or 0ven
". 0xit
2
The given number is a prime
0nter the numberS.$
Choose one of the options given below
1. *actorial of the given number
3+
2. (rime number or not
3. 9dd or 0ven
". 0xit
"
RESULT:
Thus the menu driven program is performed using switch cases.
12 a) MATRIX ADDITION
AIM:
To write a program to perform matrix 4ddition.
ALGORITHM:

Step 1E Start the program.
Step 2E Declare the arra2 variables of respective data t2pe.
Step 3E Cet the number of rows and columns.
Step "E Cet the element of matrix 4.
Step $E Cet the element of matrix '.
Step )E 4dd the rows of 4 with respective columns of ' b2 ta>ing the
corresponding element in 4 and ' using for loop.
Step +E (rint the resultant matrix.
Step -E Stop.
3-
SAMPLE OUTPUT:
0nter the rows and column of two matrixesS 3 3
0nter the elements of 4 matrixS 1 2 3 " $ ) + - 1
0nter the elements of ' matrixS 1 2 3 " $ ) + - 1
The addition of two matrix
2 " )
- 13 12
1" 1) 1-

RESULT:
Thus the matrix addition is performed using C.
12 b) MATRIX MULTIPLICATION
AIM:
To write a program to perform matrix multiplication.
ALGORITHM:
Step 1E Start the program.
Step 2E Declare the arra2 variables of respective data t2pe.
Step 3E Cet the number of rows and columns.
Step "E Cet the element of matrix 4.
Step $E Cet the element of matrix '.
Step )E ultipl2 the rows of 4 with respective columns of ' b2 ta>ing the
corresponding element in 4 and ' using for loop.
Step +E (rint the resultant matrix.
Step -E Stop.
31
SAMPLE OUTPUT:
0nter the :ows and Columns of two matrixesS 3 3
0nter the elements of 4 matrixS 1 2 3 " $ ) + - 1
0nter the elements of ' matrixS 1 2 3 " $ ) + - 1
The multiplication of two matrix
33 3) "2
)) -1 1)
132 12) 1$3

RESULT:
Thus the matrix multiplication is performed using C.
13 a) TO FIND PALINDROME OR NOT
AIM:
To write a program to find whether the given string is a (alindrome or not
ALGORITHM:

Step1E Start the program.
Step2E :ead the name aT13U.
Step3E Cop2 the string using strcp28b,a;.
Step"E :everse the string using strrev8a;.
Step$E Calculate nMstrcmp8a,b;.
Step)E .f 8nMM3; then
Step+E (rint VThe given string is a (4!.7D:90W.
Step-E 0lse
Step1E(rint VThe given string is not a (4!.7D:90W.
"3
Step13E Stop.
SAMPLE OUTPUT:
0nter the stringE
madam
The given string is a (4!.7D:90
0nter the stringE
computer
The given string is not a (4!.7D:90
RESULT:
Thus the given string is chec>ed whether (alindrome or not using C program.
13 b) UPPER CASE TO LOWERCASE AND VICE VERSA
AIM:
To convert the given string from lower case to upper case and vice versa .
ALGORITHM:
Step1E Start the program.
Step2E .nput .,a.
Step3E :ead the string nameT13U.
Step"E Set .M3.
Step$E .f 8nameT.UXMQY3Q;
Step)E Calculate aMislower8nameT.U;.
Step+E .f 8aXM3; then
Step-E (rint < toupper8nameT.U;
Step1E 0lse.
"1
Step13E (rint# tolower8nameT.U;
Step11E .ncrement .KK.
Step12E Coto step $.
Step13E Stop.
SAMPLE OUTPUT:
0nter the StringE
C9m(uTe:
computer
RESULT:
Thus the string is converted into lower from upper and into upper from lower.
14a) TO PERFROM ARITHMETIC OPERATIONS (CALL BY VALUE)
AIM:
To write a program to perform arithmetic operations using function.
ALGORITHM:
Step1E Start the program.
Step2E Declare the functions for addition, subtraction, multiplication, division., and
modulo
Step3E :ead the values of a,b.
Step"E Call the functions in different variables c, d, e, f, g.
Step$E (rint the values stored in c, d, e, f, g in the main function.
Step)E Stop.
SAMPLE OUTPUT:
"2
0nter two numbersE
)
3
4dditionM1
SubtractionM3
ultiplicationM1-
DivisionM2
oduloM3
RESULT:
Thus the 4rithmetic operations are performed using functions in C.
14 b) TO SWAP THE TWO FUNCTIONS (CALL BY REFERENCE)
AIM:
To swap the values stored in the two variables using Call '2 :eference.
ALGORITHM:
Step1E Start the program.
Step2E :ead the values of a, b.
Step3E Declare the function swap8Fa,Fb; . Coto Step ".
Step"E Define the function swap8int 6a,int 6b;
Step$E .nitialiAe 6>M6 a, 6 aM6 b, 6 bM 6>.
Step)E (rint the values of 6 a,6 b in the main function.
Step+E Stop.
SAMPLE OUTPUT:
"3
0nter the values of a F bE
23
"$
The value of ZaZisE"$
The value of ZbZisE23
RESULT:
Thus the two values are swapped using Call b2 :eference in C.
15. USING STRUCTURE-STUDENT RESULT CALCULATION
AIM:
To write a program to create student mar> sheet using structure
ALGORITHM:
Step 1E Start the program.
Step 2E Create a structure that includes name, id no., mar>1, mar>2, mar>3.
Step 3E Declare the variables Total, 4verage, Crade of respective data t2pe.
Step "E Cet the values for name, id no., mar>1, mar>2, mar>3.
Step $E Calculate the total mar> and average.
Step )E if the 4verage is above )3, then Crade 4.
if the 4verage is above $3 F below )3, then Crade '.
if the 4verage is below )3, then Crade C.
Step +E (rint the values of name, id no., mar>1, mar>2, mar>3, Total,
4verage, Crade respectivel2.
""
Step -E Stop
SAMPLE OUTPUT:
0nter the number of studentsE 2
0nter the Student detailE
:oll noE 23
7ameE rahul
*irst sub,ect mar>E +-
Second sub,ect mar>E 13
Third sub,ect mar>E -3

T9T4!M2"-
4?0:4C0M-2.333333
D.ST.7CT.97
0nter the Student detailE
:oll noE 3"
7ameE tena
*irst sub,ect mar>E 3"
Second sub,ect mar>E +-
Third sub,ect mar>E )3
T9T4!M1+2
4?0:4C0M$+.333333
*4.!
"$
RESULT:
Thus the students details are created using Structure.
16 USING UNION-EMPLOYEE NET SALARY CALCULATION
AIM:
To write a program to find emplo2ee net salar2 calculation 5sing union
ALGORITHM:
Step 1E Start the program.
Step 2E Create a union that include emplo2ee name, emplo2ee id no.,basic pa2.
Step 3E Declare the variables B:4.D4.70TS4!:&9* respective data t2pe.
Step "E Cet the values for emplo2ee name, emplo2ee id no.,basic pa2.
Step $E Calculate the B:4,D4 47D 70TS4!4:&.
Step +E (rint the values of emplo2ee name, emplo2ee id no,basic pa2.,B:4,D4 and
70TS4!4:& respectivel2.
Step -E Stop
")
SAMPLE OUTPUT:
0nter emplo2ee detailsE
0nter emplo2ee numberE133
0nter emplo2ee nameE&alini
0nter basic pa2E13333
B:4M2333
D4M$333
7et salar2M1+333
RESULT:
Thus the emplo2ee details are created using union.
"+

You might also like