Welcome to the MCS-011 Problem Solving and Programming Term-End Examination, December 2024. In this exam, you will be presented with various questions related to C programming and algorithms. Your task is to write a well-structured and well-documented program for each question, using proper indentation and syntax.
Note that Question 1 is compulsory, and you must attempt at least three questions from the rest. You have a maximum of 3 hours to complete the exam, and a total of 100 marks is available.
Let's begin!
Question 1 (10 marks)
Write an algorithm and draw a flowchart to check if a given number is prime or not.
Question 2 (10 marks)
Write a C program with functions to find the GCD (greatest common divisor) of two given numbers.
Question 3 (10 marks)
Explain the concept of pointers in C with a suitable example.
Question 4 (10 marks)
Differentiate between break and continue statements in loops with examples.
Question 5 (20 marks)
Explain arrays as user-defined data types with an example. How are multi-dimensional arrays declared and accessed?
Question 6 (20 marks)
Write a menu-driven C program with functions for matrix addition, subtraction, and multiplication operations.
Question 7 (15 marks)
Explain the selection sort algorithm with a C program for sorting an array of integers.
Question 8 (10 marks)
Write short notes on preprocessor directives and storage classes in C.
Question 9 (10 marks)
Write a C program to find the factorial of a number using recursion. Explain the working.
Question 10 (21/2 marks each)
Explain the syntax and usage of the following string functions: strcpy, strcat, strlen, and strcmp.
Best of luck!
Model question paper for the December 2024 MCS-011 exam
- asked a year ago
1Answers
241Views
MCS-011 Problem Solving and Programming Term-End Examination, December 2024
Time: 3 hours Maximum Marks: 100
Note: Question 1 is compulsory. Attempt any 3 questions from the rest.
- (a) Write an algorithm and draw flowchart to check if a given number is prime or not. (10 marks)
(b) Write a C program with functions to find the GCD (greatest common divisor) of two given numbers. (10 marks)
(c) Explain the concept of pointers in C with a suitable example. (10 marks)
(d) Differentiate between break and continue statements in loops with examples. (10 marks)
- (a) Explain arrays as user defined data types with example. How are multi-dimensional arrays declared and accessed? (10 marks)
(b) Write a menu-driven C program with functions for matrix addition, subtraction and multiplication operations. (10 marks)
- (a) Explain structures and unions in C with suitable examples. Mention differences between them. (10 marks)
(b) Write a C program to copy contents from one file to another. Explain the logic. (10 marks)
- (a) Explain selection sort algorithm with C program for sorting an array of integers. (15 marks)
(b) Write short notes on: (i) Preprocessor directives (ii) Storage classes in C (5 marks each)
- (a) Write a C program to find factorial of a number using recursion. Explain working. (10 marks)
(b) Explain the syntax and usage of following string functions: (i) strcpy (ii) strcat (iii) strlen (iv) strcmp (21⁄2 marks each)