COMPUTER PRACTICE LABORATORY- exercise for practices



Subject       : COMPUTER PRACTICE LABORATORY – I          
Sub. Code   : GE2113
Exercise No: 1
Date            :_______________
Title            : Document creation, Text manipulation with Scientific
                      Notations
_____________________________________________
1. Perform the following in MS-Word
i. Create a new word document and type the following text:
A ROBOT IN THE HOUSE
'Corection. You are in error. You are misinforming your father. Correction. The work
has not been done. Your computer has not been used. ERROR, ERROR". The
robot's voice was metallic.
TARUN: You are so lucccky Aditi! Manku can do so many things. It can clean the
house. It can answer the telephone, call the doctor and it can even open the door.
ADITI: Wait! There are so many things it can't do. It can't laugh. It can't do MY
HOMEWORK FOR ME. It can't even help me decide what should I wear for the
party.
ii. Save the document as DOCUMENT.DOC
iii. Insert the following text before the conversation between Aditi and Tarun
"Oh! Stop interrupting, Manku". Aditi said angrily. "You're are not supposed to
participate in every conversation"
iv. Make the story heading bold, italic and 14 pts.
v. Change the font style of entire story to MS-Comic Sans
vi. Select the heading of the document, cut and paste it at the end of the
document
vii. Undo the previous action
viii. Select the first two lines of the paragraph and convert it to uppercase
ix. Change all the uppercase letters to lowercase and vice-versa
x. Change the font style of the last paragraph 12 pts bold italic
xi. Copy this format to the first paragraph using format painter
xii. Highlight the second paragraph (Hint: use highlighter or formatting toolbar)
xiii. Change the font size of the entire text to 14 pts
xiv. Make a copy of this document with a different name (MYBOOK.DOC)
xv. Select the second paragraph of DOCUMENT.DOC and delete it
xvi. Undo the above action and see the effect
xvii. Redo the above action and see the effect
xviii. Delete the entire document(DOCUMENT.DOC)
xix. Open the document MYBOOK.DOC
xx. Show all the nonprinting characters in this document.
2. Open document MYBOOK.DOC and perform the following task.
i. Note down the default margins of MYBOOK.DOC
ii. Format the first paragraph with the following measurements:
Alignment:justified
Indentation:Left:0.4", Right:0.4"
Special: First line by 0.5"
Line spacing: 1.5 lines
iii. In the end of MYBOOK.DOC type:
MANKU IS A ROBOT NOT A HUMAN BEING.
Make 12 copies of the statement written above and apply all the text
attributes    
iv. Using different tab stops type the following data in the next page of
MYBOOK.DOC
                                APEX POLYMERS
S.No Emp# Employee Name Address Salary
1 E001 Aditi 31/9,Dr.Mukherjee Nagar       4000
2 E002 Bharti 1292, Jawahar Colony 3000
3 E003 Pradeep 19/12,Dr.Mukherjee Nagar     3050
4 E004 Arora A-91,Jawahar Colony              8000
5 E005 Narula 63/2,Patel Nagar                      4000
6 E006 Kaur 72/9,Outram Lines                  2050
7 E007 Savita 19/AZ, Dr.Mukherjee Nagar   3050
8 E008 Gaurav A6/212,Panchakula                 6750
9 E009 Avneet 101/B6,Outerm lines               5000
10 E010 Kriti 28/222,Nirankari Colony        4000
v. Give a border to the above written text
vi. Search for the word ROBOT and replace it with 'ROBOT machine'
vii. Write the following text in the next page of the same document
(MYBOOK.DOC)
If you cry nobody will cry with you but 
L
If you laugh everybody will laugh with
you.
viii. Insert a page break before the conversation between Tarun and Aditi
ix. Open a new document and insert the table with the following data:
First Name Last Name Phone Address
Sangeeta Malik 5236987 32/8,Dr.Mukherjee Nagar
Preeti Ahuja 1457896 A-E/269,Shalimar Bagh
Meenu Kataria 205623 B-P/81,B.P.Colony
Mandeep Kaur 4579681 25/K9,Outram Lines
Teena Gulati 1257936 SU-23,Dr.Mukherjee Nagar
x. Save and close the document with address.doc
xi. Again open the document MYBOOK.DOC and go to the end of the
document in one step
xii. Print preview the page containing the drawing features and use the zoom
feature to view this in different percentages.
xiii. Print only this page of your document
xiv. Use the auto correct feature of work to add short forms for:
I. AP Apex Polymers
II. V & A          Vicky & Associates
III. BPL British Petroleum Limited
IV. PACE         PACE Academy of Computer Education
V. IP               Informatics Practices
xv. Provide headers and footers in MYBOOK.DOC (headers should be
different for first page, even and odd pages). For first page give header "A
ROBOT IN THE HOUSE". For even page give header "MY DOCUMENT"
and right align it, for odd pages give header "ODD PAGE" page and left
align it. Also provide page numbers as footer(centrally align)
xvi. Type in the following contents in the same document MYBOOK.DOC
A word processor (such as MS Word) is a computer program that enables
you to create, edit, print and save documents for future retrieval and
revision.
In case of typewriter, input and output are inseparable. It means,
whenever a key is depressed i.e., input is fed to machine, a character is
printed on the sheet i.e, an output is generated. Thus, one is denied the
facility to shape the output separately. Even in the case of electronic
typewriters with memory, the storage capacity for text an facilities for its
manipulation are extremely limited. Facility for storing the input to some
external medium before producing the output provided an ideal solution to
this problem.
      Convert the above text in two column text.
xvii. Spell check your document an correct all the grammatical as well as
spelling mistakes
xviii. Close your document
3.  Edit the following documents
· Select Insert menu and click the object
· Include the Formula Editor
· Edit the above formulas
· Save the document
· Close the documents
Exercise No: 2
Date            : __________
Title            : Table creation, Table formatting and Conversion
________________________________________
i. Open a new document and insert a table with the following data:
First Name  Last Name Phone Address
Sangeeta  Malik 5236987  32/8,Dr.Mukherjee Nagar
Preeti  Ahuja 1457896  A-E/269,Shalimar Bagh
Meenu Kataria 3205623  B-P/81,B.P.Colony
Mandeep  Kaur  4579681 25/K9,Outram Lines
Teena Gulati 1257936 SU-23,Dr.Mukherjee Nagar
ii. Save the document with address.doc
iii. Select the first Row and Bold the Text.
iv. Align the text in the first row to "Center" and align the text in the remaining
rows to "Left".
v. Insert a New Column to the beginning of the table with the following data.
S.No
1
2
3
4
5
vi. Add a New Row to the End of the Table.
vii. Insert a New Row between 3 and 4
viii. Insert a New Column between 4
th and 5th Column.
ix. Change the size of the second column's width.
x. Sort the data according to alphabetical order of "First Name".
xi. Delete the third row and third Column from the table.
xii. Create a new row at the top of your table, merge the cells, and add a title to
the table.
xiii. Convert the given text into a table.
Color, Style, Item
Blue, A980, Van
Red, X023, Car
Green, YL724, Truck
Name, Age, Gender
Madhumitha, 23, F
Venkatesh, 31, M
Veena, 29, F
xiv. Split the above table into two tables
xv. Apply Borders, Shading and Color to the table.
xvi. Spell check your document and correct all the grammatical as well as
spelling mistakes
xvii. Save the above document as table.doc.
xviii. Close your document
EX NO 3: Advertisement
ADVERTISEMENT
A BRIGHT CAREER IN INFORMATION TECHNOLOGY
TREND REPORT: The Hybrid Model–Solution for Challenges in
Managing an Offshore Captive Center
EX No: 4 Mail Merge
i) Open a new document and type the following letter.
Sep 15, 2008,
                                                                                                                          Chennai.
From
        VENKATESH .P
          Sri Ranga Apartments,
          No: 120, II Avenue,
          T. Nagar.
         Chennai-17.
          
To 
Dear Sir/Madam,
With the current slow down in hiring within the high- tech field, you must be flooded
with resumes from out-placed software engineers such as myself. Please take a moment
to consider  my qualifications.  I believe in particular  is highly marketable in this tight
market:
 
Ø I worked on the team that pioneered the technology that put the PalmPilot on the
map.
In today's increasingly mobile society, this technology has places to go, and I have ideas
that could take us to the next step in office independence.
Please call me with prospective job opportunities. I am interested in a project
management position in the $95K range.
Thank you!
Venkatesh. P
Enclosure: Resume.
i. Save the document as "Letter.doc."
ii. Send the document to 10 recipients using Mail merge.
     (Use 10 different addresses)
iii. Close the document.
Abstract
A recent survey conducted jointly by
Outsourcing Center and Wipro
Technologies indicates companies still
have significant challenges in managing
their captive offshore centers.
The survey, which was not a scientific
study, polled visitors at the Outsourcing
Center portal during May 2006. It asked
CIOs and Global Sourcing Managers to
choose which of the following four
factors is their key challenge in
managing an offshore captive center:
                                                                                   
                                                            
•Rapid scalability of workforce and
infrastructure while maintaining the cost
advantage
•Aligning the offshore team with your
organization's culture and business
imperatives
•Lack of a long-term strategy or vision
for your captive offshore operation
•Lack of adequate management
bandwidth to effectively manage the
model
This discusses the survey's findings as
well as some best practices to combat the
challenges of a captive offshore center. It
also discusses the trend of using a hybrid
model— part captive, part outsourcing—
as the solution for these challenges.
 
Author
Kathleen Goolsby
                                                                                                                                          10
                                                                                                                                         
Create the above advertisement in word.
1.Open a new word document.
2.Type the heading and select the font as Times New Roman, font style as Title color and
the font size as appropriate.
3.Insert the appropriate picture.
4.Select any one WordArt Style and insert in the document.
5.Type the given article and make it into two columns.
6.Insert the given shapes.
7.Apply border to the entire page.
8.Insert header and footer and add the necessary details.
9.Save the document as advertisement.doc.
Exercise No:  5
Date            : __________
Title            : Drawing Flowcharts
________________________________________
Draw flowcharts for the following:
a. To find largest of three numbers A, B and C.
b. To find the sum of first 50 natural numbers.
c. To generate prime numbers up to N.
d. To generate the Fibonacci series of N numbers.
e. To compute factorial N (N!) where N! = 1*2*3*....*N
f. To find whether the given number is an Armstrong number or not.
g. To arrange the given data in ascending order using function.
h. To read a number N and print it's all divisors.
Exercise No: 6
Date            : ____________
Title            : CHARTS – Line, XY, Bar and Pie
________________________________________
                                            
  SPREAD SHEET
To analyze the marks of I year IT students
A B C D E F G H
1 Mark Analysis – I year
2
Roll
No.
Name Mark I
Mark II Mark III Total Average
3              
1
4              
2
5              
3
6              
4
7             
5
8             
6
9             
7
Meena 67 98 56
Vishal 56 67 65
Elisa 98 97 90
Richa 78 87 89
Swetha 45 56 54
Dravid 78 56 87
Sourav 34 45 53
i) Enter the above data in a worksheet and save the workbook as student.xls
ii) Calculate total and average for each student.
iii) Save the workbook again.
iv) Draw a pie chart to denote the names Vs total marks.
v) Try out various charts.
Practices:
Loop control statements
What will be the value of 'c' after the execution of
following program?
# include <stdio.h>
# include <conio.h>                 
void main()
{
int c=1,d=0;
clrscr();
while (d<=9)
{
printf ("\n %d %d",++d,++c);
}
}
a) 11 b) 10 c) 12 d) 9
What will be the value of 'x' after the execution of following
program?
# include <stdio.h>
# include <conio.h>
void main()
{
int k;
float x=0;
clrscr();
for (k=0;k<10;k++)
x+=.1;
printf ("\nx=%g",x);
}
a) x=1
b) x=0
c) x=1.1
d) none of the above
What will be the value of 'f' after the execution of
following program?
# include <stdio.h>
# include <conio.h>
void main()
{
char k;
float f=65;
clrscr();
for (k=1;k<=10;k++)
{
f-=.1;
}
printf ("\nf=%g",f);
}
a) f=64 b) f=-65 c) f=66 d) none of the above
What would be the final value of 'x' after execution of
the following program?
# include <stdio.h>
# include <conio.h>
void main()
{
int x=1;
clrscr();
do while (x<=10)
{
x++;
} while (x<=5);
printf ("\n x=%d",x);
}
a) x=11 b) x=6 c) x=2 d) none of the above
What will be the final values of x and y?
# include <stdio.h>
# include <conio.h>
void main()
{
int x=1,y=1;
clrscr();
do while (x<=8)
{
x++,y++;
} while(y<=5);
printf ("\n x=%d y=%d",x,y);
}
a) x=9 y=9 b) x=9 y=6 c) x=6 y= 6 d) none of the above
• Write a program to display alphabets as
given below.
az by cx dw ev fu gt hs Ir jq kp lo mn
nm ol pk qj ri sh tg uf ve wd xc yb za.
• Write a program to calculate sum of
first and last number from 1 to 10.
(Example 1+10,2+9, 3+8 sums should
be always 11)
• Write a program to display the numbers of a
series 1,3,9,27,81….n, by using for loop.
• Write a program to read a positive integer
number n and generate the numbers in the
following way. If the entered number is 3 the
output will be as follows.
9410149
9410123
• Write a program to display numbers
11,22,33…..99 using ASCII values from
48 to 57 in loops.
• Is it possible to create a loop using
goto statement? If yes write code for it.
• Evaluate the following series. Use dowhile
loop.
a) 1+3+5+7…n
b) 1+4+25+36…n
Practice Exercise -I
1) Write a program to shift the entered number by three bits left and display the
result.
2) Write a program to shift the entered number by five bits right and display the
result.
3) Write a program to mask the most significant digit of the entered number. Use
AND operator.
4) Write a program to enter two numbers and find the smallest out of them. Use
conditional operator.
5) Write a program to enter a number, carry out modular division operation by 2,3
and 4, and display the remainders.
6) Attempt the program (5) with division operation and find the quotients.
7) Write a program to enter an integer number and display its equivalent values in
octal and hexadecimal.
8) Write a program to convert hexadecimal to decimal numbers. Enter the numbers
such as 0x1c, 0x18, 0xbc, 0xcd etc.
9) Write a program to find the average temperature of five sunny days. Assume the
temperature in Celsius.
10) Write a program to enter two numbers.  Make the comparison between them
with  conditional  operator.  If  the  first  number  is  greater  than  second  perform
multiplication otherwise division operation.
Practice Exercise -II
1.    Write a program to calculate the total cost of the vehicle by adding basic cost
with
a) excise duty (15%)
b) Sales tax (10%)
 c) Octroi (5%)
       d) Road tax (1%). Input the basic cost.
2.    Write a program to display  ASCII equivalents of
a) 'A', 'B','C' and 'a','b','c'.
b) 'a'-'C', 'b'-'A' and 'c' – 'B'.
c) 'a'+'c', 'b'*'a' and 'c'+12.
3.  Write a program to enter a number that should be less than 100 and
greater than 9. Display the number in reverse order using modular division
and division operation
4. Write a program to enter a four-digit number. Display the digits of the
number in the reverse order using modular division and division operation.
Perform addition and multiplication of digits.
5. Write a program to display numbers from 0 to 9. Use ASCII range 48 to
59 and control string %c.
6. Write a program to print whether the number entered is even or odd
use conditional operator.
7.   Write a program to get age as input in years and check whether it is a
floating point input or not, if yes means calculate the number of seconds he
has lived.
8.   Write a program to check, whether the given number is prime or not?
9.    Write a program which reads Temperature, in either Fahrenheit or
Centigrade and compute, print out the temperature in opposite scale.
10.  Write a program to print the number between 10 and 20.
11.  Write a program to display the types of character using if-else
statement
12.  Generate electricity bill ,inputs meter number, customer name,
previous reading, present reading,
   units = pres- prev readings,
i. if unit is first 100(0-99) cost is 3/- per unit
ii. next 100(100-199) units cost is 3.50/- per unit
iii. next 200 (200-399)units cost is 4/- per unit
iv. next 300 (400-699) units cost is 4.50 per unit
v. above 700 units cost is 5/- per unit
Solution for Chapter 6 Exercise
1) Write a program to shift the entered number by three bits left and display the
result.
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter the number:-");
scanf("%d",&b);
a=b<<3;
printf ("\n a=%d",a);
}
OUTPUT
Enter the number:-8
a=64
Explanation In the above program an integer is entered. Using left shift operator bits are
shifted and obtained number is displayed.
2) Write a program to shift the entered number by five bits right and display the
result.
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter the number:-");
scanf("%d",&b);
a=b>>5;
printf ("\n a=%d",a);
}
OUTPUT
Enter the number:-64
a=2
Explanation The above program is same as last one. Here, right shift operator is used.
3) Write a program to mask the most significant digit of the entered number. Use
AND operator.
#include <stdio.h>
#include <conio.h>
void main ()
{
int x,n;
clrscr();
printf ("\n Enter numbers : ");
scanf ("%x",&n);
x=n&0xf;
printf ("x=%d",x);
}
OUTPUT
Enter numbers: 89
x=9
Explanation In the above program a decimal number is entered. The decimal number is
converted to hexa-decimal equivalent using %x format string in the scanf () statement.
Using & operator with 0xf number the most significant digit of enter number is masked.
4) Write a program to enter two numbers and find the smallest out of them. Use
conditional operator.
# include <stdio.h>
# include <conio.h>
main()
{
int a,b;
clrscr();
printf("Enter 1st integer:");
scanf("%d",&a);
printf("Enter 2nd integer:");
scanf("%d",&b);
printf("The smallest number =%d",(a<b?a:b));
getche();
}
OUTPUT
Enter 1st integer:35
Enter 2nd integer:18
The smallest number =18
OR
Enter 1st integer:14
Enter 2nd integer:82
The smallest number =14
Explanation In the above program two integers are entered. Using conditional operator
their comparison is done.The conditional operator also contains two statements, which
are executed after the expression is solved. Thus, the smallest number is tested and
displayed.
5) Write a program to enter a number, carry out modular division operation by 2,3
and 4, and display the
remainders.
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter a number:-");
scanf("%d",&a);
printf ("Modular Division by 2: %d",a%2);
printf ("\nModular Division by 3: %d",a%3);
printf ("\nModular Division by 4: %d",a%4);
getch();
}
OUTPUT
Enter a number:-23
Modular Division by 2: 1
Modular Division by 3: 2
Modular Division by 4: 3
Explanation In the above program an integer number is entered. Modular division by 2,4
and 4 is performed and result is displayed.
6) Attempt the program (5) with division operation and find the quotients.
#include<stdio.h>
#include<conio.h>
void main()
{
float a;
clrscr();
printf("Enter a number:-");
scanf("%f",&a);
printf ("Division by 2: %.2g",a/2);
printf ("\nDivision by 3: %.2g",a/3);
printf ("\nDivision by 4: %.2g",a/4);
getch();
}
OUTPUT
Enter a number:-24
Division by 2: 12
Division by 3: 8
Division by 4: 6
Explanation The above program is same as last one. Here, instead of modular division,
division operation is performed.
7) Write a program to enter an integer number and display its equivalent values in
octal and hexadecimal.
# include <stdio.h>
# include <conio.h>
void main()
{
int x;
clrscr();
printf ("\n Enter a number : ");
scanf ("%d",&x);
printf ("\n Hexadecimal number : %x",x);
printf ("\nOctal number : %o",x);
}
OUTPUT
Enter a number : 95
Hexadecimal number : 5f
Octal number : 137
Explanation: In the above program an integer number is entered. The format string %x
converts decimal number to hexadecimal and %o converts decimal number to octal.
8) Write a program to convert hexadecimal to decimal numbers. Enter the numbers
such as 0x1c, 0x18, 0xbc, 0xcd etc.
# include <stdio.h>
# include <conio.h>
void main()
{
int x;
clrscr();
printf ("\n Enter a number : ");
scanf ("%x",&x);
printf ("\n Decimal Number : %d",x);
}
OUTPUT
Enter a number: 5f
Decimal Number: 95
Explanation The Above program is same as last one. Here, the format string %x is used
in scanf () statement to accept number in hexadecimal format. The format string %d
converts hexadecimal number to decimal equivalent.
9) Write a program to find the average temperature of five sunny days. Assume the
temperature in Celsius.
# include <stdio.h>
# include <conio.h>
void main()
{
float a,b,c,d,e,avg;
clrscr();
printf("Enter 1st sunny day temperature:");
scanf("%f",&a);
printf("Enter 2nd sunny day temperature:");
scanf("%f",&b);
printf("Enter 3rd sunny day temperature:");
scanf("%f",&c);
printf("Enter 4th sunny day temperature:");
scanf("%f",&d);
printf("Enter 5th sunny day temperature:");
scanf("%f",&e);
avg=(a+b+c+d+e)/5;
printf("\nThe average of five sunny days temperature =%.2f oC ",avg);
getche();
}
OUTPUT
Enter 1st sunny day temperature: 28.2
Enter 2nd sunny day temperature: 27.5
Enter 3rd sunny day temperature: 29.0
Enter 4th sunny day temperature: 26.8
Enter 5th sunny day temperature: 28.1
The average of five sunny day temperature =27.92 oC
Explanation In the above program temperature of five days are entered. Sum of
temperature is calculated. Average is calculated and displayed.
10) Write a program to enter two numbers.  Make the comparison between them
with  conditional  operator.  If  the  first  number  is  greater  than  second  perform
multiplication otherwise division operation.
#include<stdio.h>
#include<conio.h>
void main()
{
float a,b,c;
clrscr();
printf("Enter two numbers:-");
scanf("%f%f",&a,&b);
(a>b) ? (c=a*b) : (c=a/b);
(a>b)?printf("Multiplication =%g",c):printf("Division =%g",c);
getch();
}
OUTPUT
Enter two numbers:-20 30
Division =0.666667
Enter two numbers:-30 20
Multiplication =600
Explanation In the above program two numbers are entered. Using conditional operator
numbers are tested. If the first number is greater than second multiplication of numbers is
calculated otherwise division is performed.
Previous
Next Post »