MCA Examination, December 2022
Problem Solving Using C · Semester 1
Paper code: MCA-89(N) · Subject code: MCA-112
Time: Three hours · Maximum marks: 70
Attempt all sections as per instructions.
Section A – Very Short Answer Questions
Attempt all five questions. There is no internal choice. 5 × 2 = 10
- Who developed C programming? Write the default value of the char datatype.
- Define an algorithm. Give two disadvantages of an algorithm.
- What is a qualifier? List qualifiers applied to primitive datatypes.
- What is the output of this code?
#define mul(a,b) a+b
void main() { int x=5, y=3, r; r=mul(x+y,x-y); Print("r=%d",r); } - Differentiate between break and exit statements.
Section B – Short Answer Questions
Attempt any two questions. 2 × 9 = 18
- If city[]="BENGALURU", write the output of printf with formats "%S", "%5S", "%10.6S", "%-10.6S", and "%10.0S", as printed. (4.5 marks)
- Write a program to calculate NCR = N! / R! * (N−R)! [as printed] using a function. (4.5 marks)
- Write a program to demonstrate a structure. (4.5 marks)
- Write a note on storage classes. (4.5 marks)
- What is a macro? Explain macro definition with an example. (4.5 marks)
- Explain any five string operations with examples. (4.5 marks)
Section C – Descriptive Answer Questions
Attempt any three questions. 3 × 14 = 42
- Write a program to display Fibonacci series using recursion.
- Write a program to copy one file to another.
- Write a program to concatenate two strings using pointers.
- Explain file access methods in C.
- Explain if and if-else with an example.
- Write a C program to generate a range of prime numbers using a function.
- Write a C program to print the product of two matrices.
- What is typedef? Explain with an example.
- Write a C program to copy content from one file to another.
- What are command-line arguments? Explain with an example.
- Differentiate between structure and union.
- Explain any two memory-related functions.

