MCS-011 : PROBLEM SOLVING AND PROGRAMMING
( Solved Question Paper June, 2014 )
Q1
1 (a) Write an algorithm and draw corresponding flowchart to calculate the factorial of a given number. Also write a C program .
1.(b) Using recursion, generate ‘n’ terms of fibonacci series (n > 0)
1 (c) Using file handling, create a file, insert some characters and count them
1 (d) using pointers concept reverse a given string.
Q2
2. (a) Write a program to find the string length without using strlen 0 function
2 (b) Write a program using C to calculate the Net salary if the basic, TA, DA, allowances and deductions are given, using structures concept.
3Q
3. (a) What is the use of continue statement ? Explain with an example.
3(b) Explain any four string functions with example for each.
3(c) How will you write a function with no arguments and with return value ? Give an example.
Q4
4 (a) Write a program to swap two values, using cell-by-value method.
4 (b) Write a program in C to multiply two matrices A and B.
Q5
5 (a) Write a macro to display the string COBOL in the following pattern.
C
CO
COB
COBO
COBOL
5.(b) Define a macro to find maximum among of 3 given numbers using # ifdef, # else.