You are on page 1of 2

G 5879 (Pages : 2) No

Name ..
MCA DEGREE EXAMINATION, JUNE 2003
Faculty of Sciences
First Semester
MCA 105 PROBLEM SOLVING AND COMPUTER PROGRAMMING IN C
Time : Three Hours Maximum : 75 marks
Section A
Answer any five questions. All questions carry equal marks.
I. (a) Draw a flow chart to display prime numbers. (8 marks)
(b) Explain Top down and Bottom up approaches in computer programming.
(7 marks)
II. (a) Write a program to calculate the real roots of the quadratic equation
ax
2
+ bx + c = 0. (8 marks)
(b) What is an unsigned integer constant ?
What is the significance of declaring a constant unsigned ? (7 marks)
III. (a) Write a program to calculate the factorial of a given integer number using recursion. (8
marks) (b) What is function prototype ? What is the advantage of using function prototypes within a program
(7 marks)
IV. (a) The annual exam marks of 100 students are tabulated as follows :
Roll No. Subject 1 Subject 2 Subject 3
Write as program to read the data and determine the following using arrays.
(i) Total marks obtained by each student.
(ii) The highest mark in each subject and the Roll No. of corresponding student.
(iii) The Roll No. of the student who secured the highest total mark. (15 marks
V. (a) Write a program to read a single lower case character and writer its uppercase equivalent. (8
marks)
(b) Distinguish between actual and formal parameters. (7 marks)
VI (a) Write a program to read in an array of names and sort them in alphabetical order. Use sort
functions that receive pointers to the function strimp & swap, Sort inturn, should call these functions
via pointers.
(7 marks)
(b) What are subscripts ? How are they written ? How are individual array elements identified ?
(7 marks)
Turn over
2 G 5879
VII. (a) What is meant by the following terms:
(i) Nesters structures.
(ii) Array of structures (8 marks)
(b) Using structure of union write a program to display student details. (7 marks)
VIII. (a) Mention how macros with arguments are written. Explain when macro are preferred to functions.
(8 marks)
(b) Write a program that will generate a data file containing a list of customers and their
corresponding telephone numbers. Use a structure variable to store the name and telephone number of
each customer.
(7 marks)

You might also like