You are on page 1of 4

'MCA (Revised) Term-End Enamination June.

2OO8 AND : PROBLEM SOLVING MCS-011 PBOGRAMMING


Time : 3 hours MaxlmumMorks: 7OO (Wetghtoge 75Vo)

Note : (il ii)


1. (a)

Questionnumber7.ls compulsory. Attenipt ony three questlonsfrom the r*t.


Design an algorithm, draw a corresponding 10

flowchart and then write a program in C to convert a given stdng to lower case. (b) _ (c) Wdte an algorithm and program in C to generate fibonacci series. Use recursion. Draw a flowchart and wfite a program in C to calculatethe number of vowels in a given string. 10 10

MCS-o1 1

P.T.o.

(d)

'array of pointers' ? Write a What do you mean by program in C to calculate the difference of ihe corresponding elements of tr,vo arrays of integers of same size.

10

2.

(a) Write the rsage of the following (with an example of


each): (i) (i0 *define enurn

(b) Write a macro for the following :


(i) (ii)
(c)

to find the smallest number among 3 given numbers. to find the factorial of a given number N.

What are the differen-ies"-libtwden stmch.rre and union ? Give one illustrative example of usage o{ the union.

3.

(a) Write a program in C, using structuresto generatea


report for employees which displays the total salary, designation, department, address etc. Assumptions can be made wherever necessary.

(b) Write a program to read formatted data from the


file. (c) Give a brief note on nul.l pointer assignment. Write a program in 'C'to illustratethis concept.

MCS-Or 1

4.

(a)

Write a program which reads a file and counts the number of lines and words in the file, assumingthat a line can contain at most 80 characters. g 6 Give differences betvveen r (i) (ii) Sequential and Random Access files Global varlable and Lncal r/adable

(b)

(c)

Write a program and flowchart to display the followingpattem: 1

2 4 7

3 5 8 9 6 1 0

11 12 13 14 15 16 17 18 19 20 2l
5, (a) Write a program in C to find the differencebetween two matricesof size (3 x 3). Write a program in C to sort a given list of numbers using bubble sort. Draw corresponding flowchart also. Explain meaning of following prototypes and mention return data type of each of-them : (i) (ii) int ('0 (char-); int .f (charJ;

7 g

(c)

{iii) double f (int a, int b, char c); (lv)' unsignedf( ); M C S - O I1 3 14,OOO

You might also like