[2] MCS-011
(c) What are the rules of using Big-O
No. of Printed Pages : 4 MCS-011
notation ? How the performance of the
algorithms are measured ? 10
MASTER OF COMPUTER
(d) Write a program to search an element in a
APPLICATIONS (REVISED) (MCA)
given list of 20 elements using linear
Term-End Examination search. 10
December, 2021 2. (a) Write a program to take a list of N
MCS-011 : PROBLEM SOLVING AND numbers, separate even and odd numbers
PROGRAMMING and put them in two separate files
(even_file and odd_file). Use file handling
Time : 3 Hours Maximum Marks : 100
concept. 10
Weightage : 75%
(b) Write a program to perform the following
Note : Question No. 1 is compulsory. Answer any operation on matrices :
D = A + (B * C)
three questions from the rest.
where A, B and C are matrices of 3 × 3 size
1. (a) Write an algorithm to convert a decimal and D is the resultant matrix. 10
number to its equivalent hexadecimal 3. (a) Write a program to convert lower case
number. Also draw its corresponding letters to upper case in a given string. 5
flowchart. 10 (b) Explain switch statement with the help of
(b) Write a program to generate Fibonacci a program segment. Also write its syntax.
series using recursion. 10 5
P. T. O.
[3] MCS-011 [4] MCS-011
(c) Write a program to award grades to 5. (a) Write a program to concatenate two strings
students depending upon the criteria without using the strcat( ) function. 10
mentioned below : 10 (b) Differentiate between sequential and
Marks less than 40, ‘E’ grade. random access files. 5
Marks above 40 but less than 50, ‘D’ grade. (c) Write short notes on the following : 5
Marks above 50 but less than 60, ‘C’ grade. (i) Structure
Marks above 60 but less than 75, ‘B’ grade. (ii) Union
Marks greater than 75, ‘A’ grade.
4. (a) Write a program to demonstrate passing a
structure to a function. 5
(b) Write a program to evaluate the following :
5
c ab .
(c) What are global variables and static
variables ? Explain with the help of an
example. 5
(d) How ‘# define’ is used to create functional
macros ? Illustrate with the help of a C
program segment. 5 MCS-011
P. T. O.