MCS-011 : PROBLEM SOLVING AND PROGRAMMING
( Solved Question Paper June, 2014 )
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.
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.
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.
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.
5 (a) Write a macro to display the string COBOL in the following pattern.
5.(b) Define a macro to find maximum among of 3 given numbers using # ifdef, # else.