60
Statistics and Computer Applications 1 G.B.N. Institute of Pharmacy “C” Language

Computer Application Record (Final)

Embed Size (px)

DESCRIPTION

manual

Citation preview

Page 1: Computer Application Record (Final)

Statistics and Computer Applications

1

G.B.N. Institute of Pharmacy

“C”

Language

Page 2: Computer Application Record (Final)

Statistics and Computer Applications

2

G.B.N. Institute of Pharmacy

C is a middle level language. Because # has features of both low level and high level

language.

Introduction to “C”

The C language is called as Block structure language. It is called so because the “C”

programs are written in the form of blocks called functions.

Character set of “C”

a-z, A-Z, 0-9

Special Characters like +, -, *, /, ( ), { }, [ ], %, & etc…,

Note:-

The “C” is a case sensitive. The program should be written only in small letters or

lower case.

Sample “C” program:-

# include < stdio.h>

# include < conio.h>

Void main ( )

{

clrscr ( );

print f (“welcome to c”);

getch ( );

}

stdio.h – Standard input / output – all standard input / output are defined.

conio.h – Console input/ output – all input / output functions related to screen or

console.

The key word void main is used to version C++

clrscr ( ) – Clear screen – defined in conio.h

print f ( ) – Standard output function – defined in stdio.h

getch ( ) – Take a character input defined in stdio.h

Page 3: Computer Application Record (Final)

Statistics and Computer Applications

3

G.B.N. Institute of Pharmacy

Constant: - A constant is same as variable but values of these location be changed during

program me execution.

Expression: - Variable (or) constant combines with operators give‟s an expression.

Rules for naming variables: -

A variable name (or) contain A – Z, a – z, 0 – 9 and only special characters under

score ( - ) has to start with an alphabet (or) under score.

Ex: -

1 num – Not a valid variable

Variable name cannot be a keyword.

Keyword: - Word which has pre defined meaning in language is called key word “C”

language has a set of 32 key words.

Ex: - int, float, if, else, while, do while etc…,

Declaration statement in “C”: -

<Data type> variable name ………;

Data types in “C”: - The type of value which store in a variable define it‟s data type.

Write a program to accept two variables and find this sum.

Constant

Numerical constant

Integas constant Ex: 7, 4, 91 etc..,

Float Constant

Ex: 3,14, 9, 18

Characters constant

Single Character

Ex: h, j, k

String Constant

Ex: Delhi etc..,

num 1

- num 1

valid variable

Data type

• Integer

• Floating

•Character

Keyword

• int

• float

•Char

Size

• 2 bytes

• 4 bytes

• 1 bytes

Page 4: Computer Application Record (Final)

Statistics and Computer Applications

4

G.B.N. Institute of Pharmacy

# include < stdio.h>

# include < conio.h>

Void main ( )

{

Int a, b, c;

clrscr ( );

print f (“Enter two values of a and b”);

scan f (“%d %d”, &a, &b);

c = a+b;

print f (“Sum of the two value is %d”, c);

getch ( );

}

Output: -

Enter two variables for a and b: 2, 4

Sum of the two values is: 6

Write a Program to store values of length and breadth for a triangle and

calculate area.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

Int l, b, area;

clrscr ( );

l = 3;

b = 6;

area = l * b;

print f (“area of triangle is %d”, area);

getch ( );

}

Output: -

Area of triangle is 18.

Write a Program to accept two numbers and swap their numbers.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

Int a, b;

clrscr ( );

print f (“Enter value for a and b”);

scan f (“%d %d”, &a, &b);

print f (“values before swap a=%d, b=%d”, a, b);

Page 5: Computer Application Record (Final)

Statistics and Computer Applications

5

G.B.N. Institute of Pharmacy

a = a+b;

b = a-b;

a = a-b;

print f ( ) n values after swap a=%d, b=%d, a, b);

getch ( );

}

Output: -

Enter value for a and b: 4, 8

Value before swap a=4, b: 8

Value after swap a=8, b=4.

Write a Program to accept radius of the circle and calculate area and

circumference.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

int r, a, c;

clrscr ( );

print f (“Enter radius of circle”);

scan f (“%f ”, &r);

a = 3.14 * r * r;

c = 2 X 3.14 * r;

print f (“area is %f and circumference is %f”, a, c);

getch ( );

}

Output: -

Enter radius of circle: 1

Area is 3.14 and circumference is 6.28.

Write a Program to accept weight in grams and print in kgs and grams.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

Int kgs, grams;

clrscr ( );

print f (“Enter weight in grams”);

scan f (“%d”, gms);

kgs = gms/1000;

gms = gms % 1000;

print f (“weight is %d kgs and %d grams”, kgs, gms);

Page 6: Computer Application Record (Final)

Statistics and Computer Applications

6

G.B.N. Institute of Pharmacy

getch ( );

}

Output: -

Enter weight in grams: 5750 gms.

Weight is 5 kg and 750 gms.

Characters in C: -

The data type char is used to Handle or store character in C. It takes a single type of memory

and use format specifics %C characters internally stored as numeric values.

Write a Program to accept an alphabet in caps and convert it to small letters.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

char ch1, ch2;

clrscr ( );

print f (“Enter any alphabet in caps”);

scan f (“%C”, &ch1);

ch2 = ch1 + 32;

print f (“alphabet in small case is %C”, ch2);

getch ( );

}

Output: -

Enter any alphabet in caps: N.

Alphabet in small case is: n.

Assignment statement in “C”: - The statement is used to store a value in brief.

Int a = 10;

a = a+1; this statement can be written in two ways.

a++

- post increment.

++

a – pre increment.

Write a Program to accept a value and apply post increment and pre increment

for that value.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

int a, b;

clrscr ( );

print f (“Enter value for a; n”);

scan f (“%d”, &a);

print f (“value of a %d”, a);

Page 7: Computer Application Record (Final)

Statistics and Computer Applications

7

G.B.N. Institute of Pharmacy

b = a ++

;

print f (“/n applying post increment a=%d”, b= ++

a);

print f (“/n applying pre increment a=%d”, b= ++

d a, b);

getch ( );

}

Output: -

Enter value for a;

Applying post increment a=11, b=10.

Apply pre increment a=12, b=12.

Input /output functions in “C”:-

The input/output functions of c are broadly divided in two types.

- Formulated I/O functions.

- Unformulated I/O functions.

Formatted input / output functions:-

In formatted Input / Output functions: - Divided into two types.

1. Character input / output functions.

2. String input / output functions.

Character input / output functions

print f

scan f

They are called as formulated I/O functions because they are format strings or specifies.

Data type

Integer

float

Character

format specifier

%d

%f

%c

Page 8: Computer Application Record (Final)

Statistics and Computer Applications

8

G.B.N. Institute of Pharmacy

getch ( );

Takes one character input but output is not shown on desktop of screen.

getchar ( );

This function is save as getch ( ) but it requires an enter key to confirm the input.

Write a Program to accept a character and check input by using character I/O

function.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

Char ch;

clrscr ( );

print f (“Enter any character”);

ch = getch ( );

print f (“/n the input is %C”; ch);

print f (“/n enter any character again”);

ch = getch ( );

getch ( )

defined stdio.h

getch ( )

getch ( )

defined in conio.h

Input

putchar( )

- defined in stdio.h

putch ( )

- defined in conio.h

output

Page 9: Computer Application Record (Final)

Statistics and Computer Applications

9

G.B.N. Institute of Pharmacy

print f (“/n the input is %C”; ch);

print f (“/n enter any character again”);

ch = getch ( );

print f (“/n the input now is %C”, ch);

getch ( );

}

Output: -

Enter any character

The input is S

Enter any character again: a

The input now is: a

Enter any character again: i (press enter)

The input now is: i

Control Structures in C:

These are used to control the flow of execution of Program.

{

-------------

-------------

-------------

Print f (“Result is: pass”);

Print f (“Result is: fail”);

getch ( );

}

Control structures are of two types;

i. Conditional / selective statement;

ii. Loops / interactive statement;

Conditional / selective statements:

This type of control structure is used when we have to rue cute a set of statement when a

condition satisfies.

Syntax:-

Form – I:-

if (<condition>)

{

/*statement*/

}

Form – II:-

if (<condition>)

{

/*statement 1*/

}

else

{

/*statement 2*/

}

Page 10: Computer Application Record (Final)

Statistics and Computer Applications

10

G.B.N. Institute of Pharmacy

Note: - The pair of bracket are optional if executing a single statement.

Write a Program to accept a numbers and check for even number.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

int n;

clrscr ( );

print f (“Enter any number”);

scan f (“%d”, 2n);

if (n%2==0)

print f (“even number”);

else

print f (“odd number”);

getch ( );

}

Output: -

Enter any number: 8

Even number.

Write a Program to accept age of a person and print message as eligible for

voting it age is 18 and else print may not eligible for voting.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

int p;

clrscr ( );

print f (“Enter age of a person”);

scan f (“%d”, &p);

if (p>=18)

print f (“person eligible for voting”);

else

print f (“person not eligible for voting”);

getch ( );

}

Output: -

Enter age of a person: 20

Person eligible for voting.

NESTED IF:-

If inside if it is called Nested if

Syntax:-

Page 11: Computer Application Record (Final)

Statistics and Computer Applications

11

G.B.N. Institute of Pharmacy

- Form – I

If (<condition – I>)

{

/*statement*/

}

else

If (<condition – II>)

{

/*statement 2*/

}

- Form – II

If (<condition – I>)

If (<condition – II>)

{

/*statement*/

}

Logical Character of “C”:- The logical operations are used to combine 2 or more

conditions.

Write a Program to accept a number and check type of the number.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

int n;

clrscr ( );

print f (“Enter any number”);

scan f (“%d”, &n);

if (n>0)

print f (“It is a positive integer”);

else

if (n<0)

print f (“It is a negative integer”);

else

print f (“It is a Zero”);

getch ( );

}

operators

& &

! !

!

meaning

logical AND

logical OR

logical NOT

Page 12: Computer Application Record (Final)

Statistics and Computer Applications

12

G.B.N. Institute of Pharmacy

Output: -

Enter age of a person: 2

It is positive integer.

Write a Program to accept 3 numbers and find maximum of 3 numbers.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

int a, b, c;

clrscr ( );

print f (“Enter value for a, b, c”);

scan f (“%d %d %d”, &a, &b, &c);

if ((a>b) && (a>c))

print f (“max of 3 numbers is a = %d”, a);

else

if ((b>c) && (b>a))

print f (“max of 3 numbers is b = %d”, b);

else

print f (“max of 3 numbers is c = %d”, c”);

getch ( );

}

Output: -

Enter value for a, b, c: 4, 8, 6

Max of 3 numbers is b

Write a Program to accept year and check for Leap year.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

int year;

clrscr ( );

print f (“Enter any year”);

scan f (“%d”, &year);

if (year % & ==0 && year % 100! = 0!! % 400==0)

print f (“It is a leap year”);

else

print f (“It is not a leap year”);

getch ( );

}

Output: -

Enter any year: 2009

Page 13: Computer Application Record (Final)

Statistics and Computer Applications

13

G.B.N. Institute of Pharmacy

It is not leap year.

Switch case:

Switch case is extension to it else used to check for multiple conditions switch

(<expressions>)

{

Case vol 1;

Statement

break;

Case vol 2;

Statement

break;

Case vol 3;

Statement

break;

}

Write a Program to accept an Alphabet and check for vowels.

# include < stdio.h>

# include < conio.h>

Void main ( )

{

char ch;

clrscr ( );

print f (“Enter any character”);

scan f (“%C”, &ch1);

Switch (ch);

{

Case “A”

Case “E”

Case “I”

Case “O”

Case “U”

print f (“It is vowel”);

break;

Default

print f (“not a vowel”);

}

getch ( );

}

Output: -

Enter any character: I

It is vowel.

Write a Program to accept number and of choice

1 – (+) Addition

Page 14: Computer Application Record (Final)

Statistics and Computer Applications

14

G.B.N. Institute of Pharmacy

2 – (-) Subtraction

3 – (*) Multiplication

4 – (/) Division

# include < stdio.h>

# include < conio.h>

Void main ( )

{

int a, b, res, cho;

clrscr ( );

print f (“Enter any two numbers”);

scan f (“%d %d”, &a, &b);

print f (“/n 1: addition”);

print f (“/n 2: subtraction”);

print f (“/n 3: multiplication”);

print f (“/n 4: division”);

print f (“/n enter your choice b/w / $ 4”);

scan f (“%d”, &cho);

print f (“not a vowel”);

{

Case 1 res = a + b;

print f (“/n result = %d”, res);

break;

Case 2 res = a – b;

print f (“/n result =%d”, res);

break;

Case 3 res = a * b;

print f (“/n result =%d”, res);

break;

Case 4 res = a / b;

print f (“/n result =%d”, res);

break;

Default Print f (“/n in valid choice”);

}

getch ( );

}

Output: -

Enter any two numbers: 2, 4

1. Addition

2. Subtraction

3. Multiplication

4. Division

Enter your choice between 1 and 4:3

Result = 8.

Page 15: Computer Application Record (Final)

Statistics and Computer Applications

15

G.B.N. Institute of Pharmacy

Loops in C: - Loops are used to execute a set of statement until a condition is satisfied there

are 3 types of loops in c.

1. While

2. Do ….. while

3. for

While loop in C:-

Syntax:-

While (<condition>)

{

Statements;

}

Flowchart of while

False

Write a Program to print even number till 50.

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Int n =2;

clrscr ( );

while (n<=50)

{

Print f (“%d /n”, n);

n = n+2;

}

getch ( );

}

Start

Condition

Body of Loop

Next Statement

Page 16: Computer Application Record (Final)

Statistics and Computer Applications

16

G.B.N. Institute of Pharmacy

False

Output:-

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50

Print the sum of first ten natural numbers.

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Int n =1 s = 0;

clrscr ( );

while (n<=10)

{

s = s + n;

n = n + 1;

}

Print f (“%d”, &n);

getch ( );

}

Start

n = 2

is

n<=r

o

Print n Stop

n = n+2

Page 17: Computer Application Record (Final)

Statistics and Computer Applications

17

G.B.N. Institute of Pharmacy

Output: - 55

Write a Program to accept a number and calculate its functional, fractional

value

# include <stdio.h>

# include <conio.h>

void main ( )

{

Int n, f = 1;

clrscr ( );

print f (“Enter any number”);

scan f (“%d”, &n);

while (n>1)

{

f = f * n;

n ------;

}

print f (“factorial of number = %d”, f);

getch ( );

}

Output:-

Enter any number = 4

Factorial of number = 24

Write a Program to present the reverse number.

# include <stdio.h>

Start

n = 1

s = 0

s = s + n

n = n + 1

is

n<=10

Prints

Stop

Page 18: Computer Application Record (Final)

Statistics and Computer Applications

18

G.B.N. Institute of Pharmacy

# include <conio.h>

void main ( )

{

int n, rem;

clrscr ( );

print f (“accept a number”);

scan f (“%d”, &n);

while (n! == 0)

{

rem = n * 10;

rem = rem + n%10;

n = n/10;

}

print f (“The reverse number = %d”, sum);

getch ( );

}

Output:-

Accept a number = 1 2 3 4

The reverse number is = 4 3 2 1

Write a Program to accept a number and check for prime number.

# include <stdio.h>

# include <conio.h>

void main ( )

{

int n, r, s = 0, i = 1;

clrscr ( );

print f (“Enter any number”);

scan f (“%d”, &n);

while (i< = n)

{

r = n % 1;

if (r == 0)

s ++;

i ++;

}

if (s == 2)

print f (“is a prime number “, n);

else

print f (“is not a prime number “, n);

getch ( );

}

Output:-

Enter any number = 13

Is a prime number = 13

Page 19: Computer Application Record (Final)

Statistics and Computer Applications

19

G.B.N. Institute of Pharmacy

Write a Program to check whether given number is palindrome or not a

palindrome.

# include <stdio.h>

# include <conio.h>

void main ( )

{

int n, rem, sum = 0;

clrscr ( );

print f (“accept a number”);

scan f (“%d”, &n);

r=n;

while (n> 0)

{

rem = n % 10;

sum = sum * 10+rem;

n = n/10;

}

if (sum ==r)

print f (“palindrome“);

else

print f (“not palindrome“);

getch ( );

}

Output:-

Accept a number = 121

palindrome.

Write a Program to display odd numbers between 1 and 20.

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Int n = 1;

clrscr ( );

while (n< = 18)

{

n = n + 2

Print f (“%d /n“, n);

}

getch ( );

}

Output:-

1

3

5

7

Page 20: Computer Application Record (Final)

Statistics and Computer Applications

20

G.B.N. Institute of Pharmacy

9

11

13

15

17

19

Write a Program to find the sum of a digit of a numbers accepting through key

board.

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Int n, d, s = 0;

clrscr ( );

print f (“Enter value for n”);

scan f (“%d”, &n);

while (n>0)

{

d = n % 10;

s = s % d;

n = n % 10;

}

Print f (“%d“, s);

getch ( );

}

Output:-

Enter value for n = 1 4 3

8

Write a Program to print number 1 to 10 reverse order.

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Int n = 1;

clrscr ( );

while (n> = 12)

{

n = n-1; (or) n - - ;

Print f (“%d /n“, n);

getch ( );

}

Output:-

10

Page 21: Computer Application Record (Final)

Statistics and Computer Applications

21

G.B.N. Institute of Pharmacy

9

8

7

6

5

4

3

2

1

Write a Program to print natural from 1-10.

# include <stdio.h>

# include <conio.h>

Void main ( )

{

int i = 0;

clrscr ( );

while (i< 10)

{

i = i + 1;

print f (“%d“, i);

}

getch ( );

}

Output:-

1

2

3

4

5

6

7

8

9

10

Write a Program to print even number from 1 to 20.

# include <stdio.h>

# include <conio.h>

Void main ( )

{

int n = 0;

clrscr ( );

while (n< = 18)

{

n = n + 2;

Print f (“%d /n“, n);

Page 22: Computer Application Record (Final)

Statistics and Computer Applications

22

G.B.N. Institute of Pharmacy

}

getch ( );

}

Output:-

2

4

6

8

10

12

14

16

18

20

Do While:-

Syntax:-

do

{

Statements;

}

While (<condition>);

}

Flow chart of do while:-

False

True

The do while loop get executed at least once while as a single execution of the while loop is

not possible.

Write a Program to print multiples of 10 till hundred using a do while.

Start

Body of loop

Condition

Next statement

Page 23: Computer Application Record (Final)

Statistics and Computer Applications

23

G.B.N. Institute of Pharmacy

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Int n = 0;

clrscr ( );

do

{

n = n + 10;

Print f (“%d /n”, n);

}

while (n<=90);

getch ( );

}

For loop:-

Syntax:-

For (initial value; test condition, increment, decrement)

{

Statement;

}

Nested loop: - loop inside a loop is called Nested loop

Output:-

10 20 30 40 50 60 70 80 90 100

Write a Program to display multiplication table from 1 – 20 as output

# include <stdio.h>

# include <conio.h>

void main ( )

{

int i, j;

clrscr ( );

for (i = 1; i<=10; i ++)

{

for (j = 1; j<=10; j ++)

{

print f (“%d * %d /n”, j, i, j * i);

}

print f (“/n /n”);

getch ( );

}

Page 24: Computer Application Record (Final)

Statistics and Computer Applications

24

G.B.N. Institute of Pharmacy

Output:-

1 – 20 tables

Write a Program to display matrix

∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Int i, j;

clrscr ( );

for (i = 1; i<=3; i ++)

{

for (j = 1; j<=3; j ++)

{

Print f (“*/A”);

}

getch ( );

}

Output:-

* * *

* * *

* * *

Write a Program to display output 1 1 1

1 1 1

1 1 1

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Int i, j, n = 1;

clrscr ( );

for (i = 1; i<=3; i ++)

{

for (j = 1; j<=3; j ++)

{

print f (“%d /f”, n);

}

Print f (“/n /n”);

{

getch ( );

}

Output: - 1 1 1

1 1 1

1 1 1

Page 25: Computer Application Record (Final)

Statistics and Computer Applications

25

G.B.N. Institute of Pharmacy

Write a Program to display output 1

2 2

3 3 3

4 4 4 4

5 5 5 5 5

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Int i, j;

clrscr ( );

for (i = 1; i<=j; i ++)

{

for (j = 1; j<=i; j ++)

}

print f (“%d”, j);

}

Print f (“/n /n”);

{

getch ( );

}

Output: - 1

2 2

3 3 3

4 4 4 4

5 5 5 5 5

Write a Program to print output as 1

1 2

1 2 3

1 2 3 4

1 2 3 4 5

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Int i, j;

clrscr ( );

for (i = 1; i<=5; i ++)

{

for (j = 1; j<=5; j ++)

}

print f (“%d”, j);

}

Print f (“/n”);

{

getch ( );

}

Page 26: Computer Application Record (Final)

Statistics and Computer Applications

26

G.B.N. Institute of Pharmacy

Output: - 1

1 2

1 2 3

1 2 3 4

1 2 3 4 5

Arrays in C:-

Array: -

An array says collection of similar types of statements stored in the consecutive or

adjacent memory location.

The individual element of the array is referred with the array name and subscript or

a index value.

The Subscript or the index value tells about the position of the elements in the array.

The Subscript or the index value in „c‟ always starts from zero (0).

Declaring an array:-

<Date type> Array name size (Z);

Example

int n (10);

6001 6002 6003 6004 6006

n (0) n (3) n (a)

Double dimensional array:-

In double dimensional array every element as 2 index.

- a row index and

- a column index

Declaring double dimensional array:-

Date type array name (row size) (column size);

Ex: - int matrix [5] [3];

Write a Program to declare and process a double dimensional array

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Int arr (3) (3) = {{10, 20, 30}, {40, 50, 60}, {70, 80, 90}};

int i, j;

clrscr ( );

Page 27: Computer Application Record (Final)

Statistics and Computer Applications

27

G.B.N. Institute of Pharmacy

print f (“/n the array elements are /n”);

for (i = 0; i<3; i ++)

{

for (j = 0; j<3; j ++)

{

print f (“%d /f”, arr [i] [i]);

}

Print f (“/n”);

{

getch ( );

}

Output: - The array elements are 10 20 30

40 50 60

70 80 90

Write a Program to print transpose of a given matrix.

# include <stdio.h>

# include <conio.h>

void main ( )

{

Int arr (3) (3) = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};

int i, j;

clrscr ( );

print f (“/n Transpose elements are /n”);

for (i = 0; i<3; i ++)

{

for (j = 0; j<3; j ++)

print f (“%d /t”, arr [i] [j]);

{

print f (“/n”);

}

getch ( );

}

Output: - 1 2 3

4 5 6

7 8 9

Transpose elements are 1 4 7

2 5 8

3 6 9

Write a Program to accept two arrays and store its sum in third way.

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Page 28: Computer Application Record (Final)

Statistics and Computer Applications

28

G.B.N. Institute of Pharmacy

int a (3) (3), b [3] [3], c [3] [3];

int i, j;

clrscr ( );

print f (“Enter values for first array /n”);

for (i = 0; i<3; i ++)

{

for (j = 0; j<3; j ++)

scan f (“%d”, &a (i) (j)];

print f (“Enter values for second array /n”);

for (i = 0; i<3; i ++)

for (j = 0; j<3; j ++)

{

scan f (“%d”, &a (i) (j)];

c [i][j] = a [i][j] + b[i][j];

}

}

Print f (“/n the result array /n”);

Print f (“/n the result array /n”);

for (i=0; i<3; i++)

{

for (j=0; j<3; j++)

{

print f (“%d /f”, c [i] [j]);

}

Print f (“/n”);

}

getch ( );

}

Output: - Enter values for first array = 1 2 3

4 5 6

7 8 9

Enter values for second array = 1 1 1

3 2 1

4 5 1

Result array is = 2 3 4

7 7 7

11 13 10

Strings:-

A String is a set (or) group of character also called as array of Characters.

Declaring a String:-

Ex: - void main [20];

Page 29: Computer Application Record (Final)

Statistics and Computer Applications

29

G.B.N. Institute of Pharmacy

{

char name [20];

clrscr ( );

Print f (“Enter name”);

Scan f (“%s”, &name);

Print f (“% name is % s”, name);

getch ( );

}

Initializing string:-

Char name [20]; “GBNP”

Output: G B N P

- 10 is called null character

- Null character gives the end of string.

Accept the string and count the no. of words in string.

# include <stdio.h>

# include <conio.h>

Void main ( )

{

char (25);

int i, we = 1;

clrscr ( );

print f (“Enter any string”);

gets (s);

for (i = 0; s (i) i= (10); i++)

{

If (s [1] == 1)

we ++

}

print f (“/n the no. of words = %d”, we);

getch ( );

}

Output: -

Enter any string: My name is Manasa.

No. of words = 4.

Strcpy ( ): The source of a string is copied down to target string.

Strcmp ( ): The function is used to compare two strings functions; stamp (s1, s2)

Strupr ( ): Convert string to caps (or) upper case.

Strlwr ( ): Cover string to lower case.

Strcat ( ):

Used to concatenate or add two strings

Page 30: Computer Application Record (Final)

Statistics and Computer Applications

30

G.B.N. Institute of Pharmacy

Syntax: - Strcat (source target)

Ex: - # include <stdio.h>

# include <conio.h>

void main ( )

{

Char s1 (20) = “rama”;

Char s2 (20) = “krishna”;

Strcat ( );

print f (“The result string is %s”, s1);

getch ( );

}

Output:-

Ramakrishna.

- Strrec: Returns reverse of the string.

Functions in „C‟:-

A function is a set of statements getting exacted as a black and performing a special

task can optionally written a value they are 2 types of functions.

1. Library or built in functions.

2. UDF (user defined function)

Library function:-

Library functions are pre defined functions by the language.

Ex: strln, print f, scan f etc…..,

UDF functional:-

The function is defined by user according the requirement are called the UDF (or)

user defined function.

Function gives us concept of modularity and reusability.

Modularity – which can logically divide the function into small parts? We can pass

arguments to the function. The arguments passed to the functions are called as actual

arguments.

Argument can pass to the functions in 2 ways.

Call by value

Call by reference

Write a Program to accept two numbers and find their sum using a function

(call by value).

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Page 31: Computer Application Record (Final)

Statistics and Computer Applications

31

G.B.N. Institute of Pharmacy

Int a, b, s;

clrscr ( );

print f (“Enter values for a and b”);

scan f (“%d %d”, &a, &b);

s = sum (a, b);

Print f (“sum = %d”, f);

getch ( );

}

Sum (int x, int y)

{

int = x+y;

return (s);

Output:-

Enter values for a and b: 23

Sum = 5.

Write a Program to accept 2 no‟s and swap their values using a function.

# include <stdio.h>

# include <conio.h>

Void main ( )

{

int a, b;

clrscr ( );

print f (“Enter 2 values for a and b”);

scan f (“%d %d”, &a, &b);

print f (“values after swapping a = %d, b= %d”, a, b);

getch ( );

}

void swap (int x, int y)

{

int t = x;

x = y;

y = t;

}

Output:-

Enter values for a & b: 150 250

Values before swapping a = 150 b = 250.

Write a Program to print O/P as 5 5 5 5 5

4 4 4 4

3 3 3

2 2

1

# include <stdio.h>

# include <conio.h>

Void main ( )

{

Page 32: Computer Application Record (Final)

Statistics and Computer Applications

32

G.B.N. Institute of Pharmacy

int i, j;

clrscr ( );

for (i = s; i>=1; i --)

{

for (j = 1; j<=1; j ++)

{

print f (“%4d”, i);

}

print f (“/n”);

}

getch ( );

}

Output: - 5 5 5 5 5

4 4 4 4

3 3 3

2 2

1

Page 33: Computer Application Record (Final)

Statistics and Computer Applications

33

G.B.N. Institute of Pharmacy

Microsoft Word

Page 34: Computer Application Record (Final)

Statistics and Computer Applications

34

G.B.N. Institute of Pharmacy

Introduction

Microsoft Word is a word processor that is incredibly powerful and amazingly simple to use. An in

depth we will just be looking at some of its most basic features here, as well as some tools

especially appealing for you. Microsoft word is word-processing software that allows user to create,

edit, and print documents using a computer.

Of all computer applications, word processing is the most common. To perform word processing,

you need a computer, a special program called a word processor. A word processor enables you to

create a document, store it electronically on a memory, display it on a screen, modify it by entering

commands and characters from the keyboard, and print it on a printer.

Microsoft Word 2007 release includes several changes, including a new XML-based file format, a

redesigned interface, an integrated equation editor and bibliographic management. Additionally, an

XML data bag was introduced, accessible via the object model and file format, called Custom XML

– this can be used in conjunction with a new feature called Content Controls to implement

structured documents.

Word 2007 uses a new file format called docx.

Word 2000–2003 users on Windows systems can install a free add-on called the "Microsoft Office

Compatibility Pack" to be able to open, edit, and save the new Word 2007 files. Instead Word 2007

can save to the old doc format of Word 97-2003.

It is also possible to run Word 2007 on Linux using Wine.

It also has contextual tabs, which are functionality specific only to the object with focus, and many

other features like Live Preview (which enables you to view the document without making any

permanent changes), Mini Toolbar, Super-tooltips, Quick Access toolbar, Smart Art, etc.

Ms-Word

Type a letter in Ms-Word to TATA MC – GREW HILL Company

requesting a sample reference book for college library and apply following format.

Adjust page size – 8X11”inc

All the paragraphs must be double – spaced.

Indent the Paragraph 1 – inch from both margins.

Use bold and italics option at the required places.

Justify the paragraph use the spell check to correct the typing mistakes.

Page 35: Computer Application Record (Final)

Statistics and Computer Applications

35

G.B.N. Institute of Pharmacy

Business Letter

Date: - 21/10/2009,

Hyderabad.

TO

The TATA MC – GREW HILL,

176, Gowtham Nagar,

New Delhi – 67890000.

Fax – (040) – 43543555.

Sub: Requesting sample reference books (Font italic).

Respected Sir/Madam,

I G.Sania student of B.Com (Comp) requesting for sample books for college library.

Some books and author are listed below. Please delivery the following books as soon as

possible.

1. Industrial Management – Mathor

2. Business Economics – Akhil

3. Information technology – U.N.Basker

Thanking you,

Your‟s truly,

G.Sania.

Address:-

G. Sania,

S/O. XXXXXXX,

H.NO – 1-1-234,

Narayana Guda,

Sec – bad.

Step 1:

To Create new page and setting margin and size

Open Ms – Word from start menu.

Select new option from file menu.

Select Blank document.

Select paper size from page – set up (8X11”inc)

Select page setup.

Select margin from page – set up.

Type the letter format as given below.

Step 2:

To apply font formats / size, style – body, italics, spacing/

Go to format menu.

Select font option.

Apply the font type, style and size where ever necessary.

Select spacing from character spacing option.

Step 3:

Page 36: Computer Application Record (Final)

Statistics and Computer Applications

36

G.B.N. Institute of Pharmacy

To apply paragraph formats (Line space, Justify).

Go to format menu.

Select paragraph options.

Select line spacing.

From drop down list select, required option.

Align the paragraph from general option – by selecting “justify”.

Step 4:

To apply bullets and Numbering.

Go to format menu.

Select bullets and Numbering.

Select the required type of bullets and apply whenever necessary.

Step 5:

To correct spelling and Grammer.

Go to tool menu.

Select the spelling and Grammer wherever necessary by selecting “Change &

Ignore” button.

(OR)

Right click on the underlined red (or) green word.

Select nearest word from list word provided by the top menu.

Ignore the word, by selecting “Ignore once”.

Letter Head

Create a letter head in MS - Word for your college with following

specification.

Name of the College use – time new roman – font and size 20.

For address of the college use courier and size – 12.

Insert logo clip art (or) auto shapes.

XXXXXX Institute of Pharmacy

Edulabad (V), Ghatkesar (M), R.R (Dist).

Step 1:

To create new page and setting margin & Size.

Open Ms – Word from start menu.

Select new option from file menu.

XXXXXXXX

Page 37: Computer Application Record (Final)

Statistics and Computer Applications

37

G.B.N. Institute of Pharmacy

Select blank document.

Select page setup.

Select paper size – from page –set up (8X11”inc)

Select the margin from page – setup.

Type the letter format as given below.

Step 2:

To apply font format (size, style, bold, italic, spacing).

Go to formal menu.

Select font option.

Apply the font type and size wherever necessary.

Select spacing from character spacing option.

Step 3:

To apply paragraph formats (line space, justify).

Go to format menu.

Select paragraph option.

Select line spacing

From drop down list select, required option.

Align the paragraph from general option by selecting “justify”.

Step 4:

To apply auto shape.

Go to drawing toolbar.

Select auto shape.

Click on banner.

Select the required banner.

Right click to add test.

Time Table

Create a college time table in MS – Word for 6 subjects for 6 days, 1 hour

for period.

Days Period 1 Period 2

B

R

E

A

K

Period 3 Period 4

L

U

N

C

H

Labs

Page 38: Computer Application Record (Final)

Statistics and Computer Applications

38

G.B.N. Institute of Pharmacy

Monday Physical

Pharmacy

Unit

Operation

Organic

Chemistry

Computer

&

Statistics

Batch -1 – Organic

Chemistry

Batch – 2 -

Physical Pharmacy

Tuesday Physical

Pharmacy

Unit

Operation

Organic

Chemistry

Computer

&

Statistics

Batch – 1 -

Physical Pharmacy

Batch -2 – Organic

Chemistry

Wednesday Organic

Chemistry

Anatomy

Physiolog

y

Unit

Operation

Seminar

Tutorial

Batch – 1 –

Computers

Batch – 2 –

Anatomy

Physiology

Thursday Organic

Chemistry

Anatomy

Physiolog

y

Unit

Operation

Seminar

Tutorial

Batch – 1 –

Anatomy

Physiology

Batch – 2 –

Computers

Friday Physical

Pharmacy

Computer

&

Statistics

Anatomy

Physiology

Exam

Tutorial

Saturday Physical

Pharmacy

Computer

&

Statistics

Anatomy

Physiology

Library

Games

Step 1:

To create table.

Go to table menu.

Select insert option

Select table.

Provide required number of rows of column in row and column option.

Click on to create table.

Step 2:

To perform merge optating in table.

Drag (or) highlight the row (or) column.

Right click.

A top menu opera on screen.

Select merge cell.

Provide the matter on merged cell if needed.

Step 3:

To provide matter in vertically on horizontal wise in the merged column

(or) row.

Right click on the merged column (or) row.

A top menu appears on screen, then select “text description”.

Select “orientation”.

Click on.

Step 4:

To apply cell alignment on row (or) column in a table.

Page 39: Computer Application Record (Final)

Statistics and Computer Applications

39

G.B.N. Institute of Pharmacy

Highlight the row or column in table by dragging.

Right click on row (or) column part of cells.

A top menu appears on screen.

Select the option “cell alignment”.

Apply the required alignment from cell alignment.

Step 5:

To add row (or) column in a table.

Go to table menu.

Select insert option.

Select click on the option (i-e).

1. Column (above (or) below) (or)

2. Row (above (or) below)

Step 6:

To delete a table row (or) column.

Select the row (or) column in a table.

Right click.

A top menu appears on screen.

Select the option “delete entire column (or) row”.

Click ok.

Visiting Card

Create a visiting card of your college as per the following specification using

Ms-Word size of the visiting card is “31/2

X 2 add address separated by a line and insert

logo.

Step 1:

To get page size.

Go to file menu.

Click on page setup.

Select margin option and set top, left, bottom, right margin.

As click on paper size & set paper size as “31/2

X (2)h” inch.

Click ok.

Step 2:

To set font color, style, size.

Frame the matter on the card with plane no. on right corner & college name to center of card

& address to the bottom of card and principal name to left corner of card.

Go to format menu.

Select font option.

From font option and apply font, type, size, wherever necessary on the font.

Align the college name to center from format tool bar.

Page 40: Computer Application Record (Final)

Statistics and Computer Applications

40

G.B.N. Institute of Pharmacy

Step 3:

To add line on card.

Go to drawing tool bar, and then click on line.

Drag the line from left to right on the document card area.

Apply line style from drawing tool bar.

Step 4:

To insert College logo.

Go to drawing tool bar.

Select auto shape.

Right click on banner.

Click the option add text.

Type text and then add font, color and size wherever needed.

Mail Merge

What is Mail Merge?

The Mail Merge Wizard takes you step-by-step through the process of creating merged

documents.

It is always available and easily accessible in the Mailings Tabs.

At each step, options will help you to modify the merge to your needs.

This document describes each step in general and the options available.

At any point while using the wizard, you can go back to a previous step to adjust

your choices.

Principal

Phone: 11111

XXXXXXX

Cell: 12345678.

Course offering A B C D E R

X Y Z TTTTTTTT

Address: Opp. Seven hills, circle, Ghatkesar

Page 41: Computer Application Record (Final)

Statistics and Computer Applications

41

G.B.N. Institute of Pharmacy

Create an Envelope in Mail Merge

Envelope is a starting document for the Mail Merge. Mail Merge permits you to place

up one mailing envelope.

You can print that one envelope with special information for each record in the

database or table, using data from an external database or table.

For create an Envelope in Mail Merge follow these steps:

1. Click on Mailings tab on the Ribbon.

2. Click on Envelopes in Create group.

You can also select Envelope from Start Mail Merge in Start Mail Merge Group.

Select the Options for Envelope.

3. An Envelopes and Labels dialogue box open.

4. Fill the entries under Delivery Address and Return Address.

5. Click Add to Document.

Create Labels

You can used Labels in a variety of ways to make your work easier. Applying labels to

anywhere can save you a lot of time and make organizing your work easier.

You can print one label with special information for each record in the table or

database.

For create an Envelope in Mail Merge follow these steps:

Click on Mailings tab on the Ribbon.

Click on Labels in Create group.

You can also select Labels from Start Mail Merge in Start Mail Merge Group.

Select the Options for Envelope.

3. An Envelopes and Labels dialogue box open.

Page 42: Computer Application Record (Final)

Statistics and Computer Applications

42

G.B.N. Institute of Pharmacy

4. Fill the entries under Address.

Create a Mail Merge Document

For create a Mail Merge Document follow these steps:

1. Click on Mailings tab on the Ribbon.

2. Select document type (Such as: Letters E-mail messages, Envelopes, Labels, Directory) from

Start Mail Merge in Start Mail Merge Group.

3. Setup the Selected document.

4. Select mail recipients

5. Start writing your letter.

Write & Insert Fields

In the Mailings tab, there is a group of Write & Insert Fields.

In this group there are various options for fields.

These are the following options:

Highlight Merge Field: Highlight Merge Fields use for highlight the field you have inserted

into the Word Document.

Address Block: Address block add an address to your letter.

Greeting Line: Greeting Line adds a Greeting Line to your document.

Insert Merge Field: Add any field from recipient list to your document.

Preview Results

It shows the Merged Data. You can see how your data looks like.

For preview of your Mail Merge result follow these steps:

1. Click on Mailings tab on the Ribbon.

Page 43: Computer Application Record (Final)

Statistics and Computer Applications

43

G.B.N. Institute of Pharmacy

Finish Mail Merge

To Finish of your Mail Merge document follow these steps:

1. Click on Mailings tab on the Ribbon.

2. Click on Finish & Merge on the Finish group.

Page 44: Computer Application Record (Final)

Statistics and Computer Applications

44

G.B.N. Institute of Pharmacy

Microsoft Power point

Page 45: Computer Application Record (Final)

Statistics and Computer Applications

45

G.B.N. Institute of Pharmacy

Introduction

PowerPoint is most powerful software that allows creating professional multimedia presentations. It

is part of the Microsoft Office suite. It was firstly introduced by Microsoft. It runs on Microsoft

Windows and some others operating system. PowerPoint is used by business people,

educationalists, students, and instructors.

PowerPoint provides facility that you can make presentation using template & design view with

interactive style. There are lots of designing tools available over PowerPoint like chart, table, word

art, clipart, auto shape.

PowerPoint 2007 has powerful graphics abilities and boundless formatting features that allow even

the beginner to create professional looking presentations.

PowerPoint provide facility that you can see presentation on LCD Projector with audio & video. It

very useful in office to present project through PowerPoint. It tells that how can make good

presentation in a very efficient way.

It enables users to easily and quickly create high-impact, animated slide presentations.

Create a Power point presentation with 5 slides describing sports day in your

college using blank presentation.

Step 1:

To Create Power point using blank presentation.

Go to Start menu.

Select Program.

Click Ms – Office.

Click on Power point

By default a new slide is created.

1. Go to file menu.

2. Click on new.

3. Select blank presentation.

Step 2:

To add matter to slide.

Select the slide by clicking in rectangular area of slide.

Add the matter step.

Page 46: Computer Application Record (Final)

Statistics and Computer Applications

46

G.B.N. Institute of Pharmacy

Step 3:

To add new slide.

Go to insert menu.

Click on new slide.

Apply the required slide layout.

Type the matter.

Repeat the process.

Step 4:

To set slide layout.

Go to format menu.

Select slide layout.

Click on the layout to apply on slide.

Step 5:

To get Slide back ground.

Go to format menu.

Select back ground.

Select the color drop drown list from “back ground” “fill option”.

Click fills effect.

Select the color option. One color two colors present.

Apply shading style, like horizontal, vertical and diagonal.

Click ok.

Click Apply.

Select the font and then apply font – color size, style and then click ok.

Step 6:

To set custom Animation.

Go to slide show menu.

Select custom Animation.

Click on the rectangular text or object area.

User can observe and effect button is enables.

Select the effects.

Step 7:

To apply slide transition on slide.

Go to slide show menu.

Click on rehearse time.

From drop down list select the required slide transition.

Step 8:

To set rehearse timing.

Page 47: Computer Application Record (Final)

Statistics and Computer Applications

47

G.B.N. Institute of Pharmacy

Go to slide show menu.

Click on rehearse time.

Keep clicking on the mouse till end of slide show.

Step 9:

To Start Slide show.

Select the first slide.

Go to slide show menu.

Select view show.

Create a power point describing traffic rules using design template.

Step 1:

To create power point using design template.

Go to start menu.

Select Program.

Click power point.

Click MS – Office.

By default a new slide is crated.

Go to file menu and close default slide.

Select new.

Select design template.

Select design template presentation from list of presentations.

A new slide is created with added design.

Step 2:

To add matter to slide.

Select the slide by clicking in rectangular area of slide.

Add the mathes.

Step 3:

To add new slide.

Go to insert menu.

Click on new slide

Apply the required slide layout.

Type the matter.

Report the process.

Step 4:

To get back ground to slide.

Go to format menu.

Select back ground and then click unit back ground.

Select color drop down list from “back ground fill option.

Click fills effect.

Page 48: Computer Application Record (Final)

Statistics and Computer Applications

48

G.B.N. Institute of Pharmacy

Select color option – one color, two colors present.

Apply shading style. Like horizontal, vertical and diagonal.

Click ok.

Click apply.

Select the font and then apply font – color, size style

Click ok.

Step 5:

To set slide layout.

Go to format menu.

Select slide layout

Select the layout to apply on slide.

Step 6:

To set custom Animation.

Go to slide show.

Select custom activation.

Click on the rectangular text or object area.

User can observe add effect button in enables

Select the effects.

Step 7:

To apply slide transition on slide.

Go to slide show menu.

Select slide transition.

From drop down list select the required slide transition.

Step 8:

To set rehearse timing.

Go to slide show menu.

Click on rehearse time.

Keep clicking on the mouse till end of slide show and then click on.

Step 9:

To start slide show.

Select the first slide.

Go to slide show menu.

Select view show.

Page 49: Computer Application Record (Final)

Statistics and Computer Applications

49

G.B.N. Institute of Pharmacy

Microsoft Access

Page 50: Computer Application Record (Final)

Statistics and Computer Applications

50

G.B.N. Institute of Pharmacy

Introduction

Microsoft Access is a Window based program created byMicrosoft. It

helps you store & manage a large collection of information.

A systamatically arrangeed database helps you manage the stored

information in an efficient way so that It can access quickly whenever

needed.

You can easily create such a database using Access.

A good Database design ensure that you will be able to perform various tasks on it efficiently and

accurately and without any hindrance.

Create a blank table with following fields in MS – Access and perform update

operation in Query.

Step 1:

Create blank base

Click on start menu.

Select program.

Click MS – Office.

Select MS – Access.

Click on file menu.

Select new.

Select blank date bade.

Provide data base.

Click create button.

A date base window appears on screen.

Step 2:

Creating the table using design view method.

Select tables from object.

Select “create table using design view”.

A table window appears on screen.

Enter field Name, data type.

Right click on “Acc NO” to assign primary key.

Save the table.

Select data on sheet view from view menu.

Enter the data under the field provided and keep the “balance” column as a blank.

Close the table.

Step 3:

Page 51: Computer Application Record (Final)

Statistics and Computer Applications

51

G.B.N. Institute of Pharmacy

Creating the Query using design view method.

Select Query from object.

Select “create query using design view” and then double click to open.

A show table window appears on screen.

A select the table and click “Add button”.

Click close button.

Step 4:

Adding fields and applying formula.

Drag and drop the balance field in the field option.

Go to Query menu.

Apply the formula as “[deposit] – [drawn]” in update to option.

Save the query.

Close the Query.

Double click on created query.

A dialog box appears on screen with message.

You are about to run update query that will modify data.

Click “yes”.

A dialog box appears with message “you update rows”.

Click “yes”.

Step 5:

To view updated data.

Select table from objects.

Select the table name.

Double click to open to see to total data.

DATA

Create a personal information (field – roll no, name, address, class) and marks

sheet table (field – roll no, math‟s, social, total) in MS – Access and create a relation

between two tables using query & apply.

Step-1:

Create data box:

Go to start

Select Program

Select MS-Office

Select MS-Office

Select blank database

Click ok

Provide data base name

Click create

A data base window appear on screen

Page 52: Computer Application Record (Final)

Statistics and Computer Applications

52

G.B.N. Institute of Pharmacy

Step-2:

Creating table –personal details

Select table from object

Select create table in design view

Table window appear on screen

Provide field name and data type, name address clean –field and then select primary

key.

Save the table

Go to view menu

Select data sheet view

Enter the data

Step-3:

Creating table-marks sheet

Select table from object

Select create table in design view

A table window appear on screen

Provide field name and data, maths, social total.

To provide primary key on roll no, right click on the yield and then select primary

key.

Save the table

Go to view menu

Select data sheet view

Enter the data

Close the table.

Step: 4

Creating query

Select query from object

Select create query in design (on screen) view

A show table window. Appear on screen

Add the table by clicking add button

Click on close button, to close show table window

Select the following field by clicking loop down list from “field option”

Right click on field

Select total option

Click on total yield

Provide formula as: lot (M)+(S)

Go to view menu

Select data sheet view

Save the query

Page 53: Computer Application Record (Final)

Statistics and Computer Applications

53

G.B.N. Institute of Pharmacy

Microsoft Excel

Page 54: Computer Application Record (Final)

Statistics and Computer Applications

54

G.B.N. Institute of Pharmacy

Introduction

Microsoft Excel 2007 is the latest version of Microsoft Office's worksheet (spreadsheet) program.

Technically a single document is called a worksheet inside a workbook but we often use the terms

worksheet, spreadsheet and workbook interchangeably.

Worksheets include numerical information presented in tabular row and column format with text

that labels the data. They can also contain graphics and charts.

Like Microsoft Word 2007, Excel 2007 takes advantage of a new, results-oriented user interface to

make powerful productivity tools easily accessible. If you're worried about capacity, Excel 2007

now accommodates 1 million rows and 16,000 columns.

Why Use Microsoft Excel 2007?

With Excel 2007 you can analyze, manage and share information fast and easily to make more

informed decisions. With the new user interface, rich data visualization, and PivotTable views,

professional-looking charts are easier to create and use than ever before.

The introduction of a new technology called Excel Services (ships with Microsoft Office

SharePoint Server 2007), brings with it significant improvements to data sharing and security. By

sharing a spreadsheet using Office Excel 2007 and Excel Services, you can navigate, sort, filter,

input parameters, and interact with PivotTable views directly on the Web browser.

MS-EXCEL

Create a work sheet of student marks list, which contain a student‟s marks in

3subjects calculate total marks , present remark , division , rank

A B C D E F G H I J

1 NAME QT CO

N

B.E TOTA

L

% PASS/F

AIL

DIVISI

ON

RA

NK

2 PRASA

D

76 78 79 233 77.661 Pass first 2

3 Sonu 45 47 48 140 46.667 Fail Fail 7

4 Mona 82 78 76 186 62 Pass Third 4

5 Deepthi 54 57 58 169 62 Pass Second 5

6 Sita 47 49 51 147 49 Pass Third 6

7 Akhil 88 89 92 269 89.667 Pass First 1

8 Sravant

hi

57 54 88 204 68 Pass First 3

9 Geetha 31 26 67 124 41.33 Fail Fail 8

Step 1:

In the cell f2 enter the same function as=sum (B2; E2)

In the cell G2 enter the percentage formula as= (f2 100)/500)

In the cell h2 enter the pass/fail formula as= if (and (12)35, D2>35)” PASS/FAIL)

In the cell I2 enter the division formula as=if (and h2=‟pan‟g2 .=T5) HRST if (and

ch2=‟pass‟ g2.55) “second” if (and ch2=pass g2>36>”third” fail)

Page 55: Computer Application Record (Final)

Statistics and Computer Applications

55

G.B.N. Institute of Pharmacy

In the cell f2 enter the rank formula as=rank (g2 g$2;g$9.o)

Step2:

To copy formula in column wise

Put the mouse pointer at the intersection point of four cells.

Drug the “t” pointer in column wise.

Repeat the process for other columns.

Step 3:

To highlight failed candidates.

Go to format menu.

Select conditional format.

Select condition 1 & then select cell value from the box.

Select color and then click ok.

Once again click on ok button.

Step 4:

To Sort name in use ending order.

Go to data menu.

Select soft.

Go to sort box and then click drop drown list.

Select field “Name” from soft by clicking on ascending order.

Click ok.

Formatting:

Go to cell as.

Go to formatting tool bar.

Click on bold.

Select font size to enlarge font.

Step 1:

Adding border.

Select the cell area.

Go to format tool bar.

Select border.

Step 2:

Performing calculation.

Put the cursor in cell i = (i.e. total).

Click on sum symbol (€) from standard tool bar.

Step 3:

To Copy the formula in column wise.

Page 56: Computer Application Record (Final)

Statistics and Computer Applications

56

G.B.N. Institute of Pharmacy

Put the mouse pointer at the intersection point of four cells.

Drag the “t” pointer in column size.

Repeat the process for other column.

Step 4:

To fill number using fill series.

Enter the number in cell as.

Drag the mouse pointer is column size.

Then go to edit menu.

Click on fill.

Click on series.

Select row from “series in”.

Then provide step value and stop value.

Step 5:

To add graph.

Go to standard tool bar.

Click on chart wizard.

Select standard type and then change type.

Click on chart sub type.

Click finish.

0

1

2

3

4

5

6

Jan Feb Mar Apr May June

Rice

Wheat

Pac

Tea

Milk

Page 57: Computer Application Record (Final)

Statistics and Computer Applications

57

G.B.N. Institute of Pharmacy

Statistics

Page 58: Computer Application Record (Final)

Statistics and Computer Applications

58

G.B.N. Institute of Pharmacy

Q1: Represent by a divided bar diagram and percentage bar diagram, the following

data on chlorophyll mutants in a M2 generation of a pulse crop. Albina, Chlorina,

Xantha, Viridis are chlorophyll mutants.

Varieties

Chlorophyll mutants

Total

Albina Chlorina Xantha Viridis

V1

V2

V3

8

12

6

16

21

18

14

17

10

4

8

6

42

58

40

Page 59: Computer Application Record (Final)

Statistics and Computer Applications

59

G.B.N. Institute of Pharmacy

Q2: Represent by a multiple bar diagram, the following data on morphological

variations in gamma-irradiated material of a pulse crop. Colors, Flower, Leaf are

Morphological variations.

Treatments

Morphological variations

Color Flower Leaf

T1

T2

30

25

70

60

18

10

Page 60: Computer Application Record (Final)

Statistics and Computer Applications

60

G.B.N. Institute of Pharmacy

Q3: Draw a pie diagram of the following data relating to the areas under cultivation of

different crops in Andhra Pradesh State (India) in the year 1987-88.

Crops Rice Jowar Bajra Maize Wheat

Area in thousands

hectares

3123

1572

324

296

11