0% found this document useful (0 votes)
29 views

Time: Three Hours Maximum: 75 Marks

The document is a practice exam for a Problem Solving and Computer Programming in C course. It contains 8 questions testing various C programming concepts. The questions cover topics like data types, conditional operators, functions, arrays, pointers, structures, unions, files and more. Students are instructed to answer any 5 questions out of the 8 questions provided. Each question is worth either 7 or 8 marks depending on the sub-questions.

Uploaded by

Sayuj Sonu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Time: Three Hours Maximum: 75 Marks

The document is a practice exam for a Problem Solving and Computer Programming in C course. It contains 8 questions testing various C programming concepts. The questions cover topics like data types, conditional operators, functions, arrays, pointers, structures, unions, files and more. Students are instructed to answer any 5 questions out of the 8 questions provided. Each question is worth either 7 or 8 marks depending on the sub-questions.

Uploaded by

Sayuj Sonu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

G 1393 (Pages : 2) No

Name ..
M.C.A (AFFILIATEDE COLLEGES) DEGREE EXAMINATION, APRIL 2005
First Semester
PROBLEM SOLVING AND COMPUTER PROGRAMMING IN C
Time : Three Hours Maximum : 75 marks
Section A
Answer any five questions. All questions carry equal marks.
1. (a) Write about space requirement for variables of different data types. (8 marks)
(b) Explain to down and bottom up approaches. (7 marks)
2. (a) Write a C 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. Print the results. (8 marks)
(b) What do you mean by type conversion ? Why is it necessary ? (7 marks)
3. (a) Write a C program to generate the first n prime numbers. (8 marks)
(b) Explain the use of a comma operator. (7 marks)
4. (a) How does a function works ? Explain how arguments are passed and results are returned.
(8 marks)
(b) Write a C program to evaluate the equation Y = x + x
2
+ + x
n
using function. (7 marks)
5. (a) Write a C program to delete duplicate elements in an array of natural numbers. (8 marks)
(b) Explain recursion with an example. (7 marks)
6. (a) What is an array of pointers ? How is it declared ? (7 marks)
(b) Write a C program to calculate the square and cube of an entered number using pointer of a variable
containing the entered number. (8 marks)
7. (a) What is a union in C. ? How is data stored using union ? (7
marks)
(b) Write a C program using structure to implementation a library database retrieval system having
details of bookcode, book name, no.of copies available and author name of 10 books. The user on
entering the author name, the program should display the book name, book code and no. of copies
available. (8 marks)
Turn over
2 G 1393
8. (a) Write short notes on :
(i) Command line arguments.
(ii) Register variables. (8 marks)
(b) Write a C program to write contents of one file in reverse into another file. (7 marks)

You might also like