MCS-011 : PROBLEM SOLVING AND PROGRAMMING
Paper 3

Time : 3 hours Maximum Marks : 100

Note:

Question number 1 is compulsory. Attempt any three questions from the rest.

Q.1. a) Write an algorithm and draw a corresponding flowchart to find the greatest number and its position among the 6 given numbers.

b) Write a program in C language to add, subtract, multiply and divide two complex numbers. (Use a Switch statement to select the operation)

c) Design an algorithm, draw a corresponding flowchart and write a program in C to reverse a given string and find whether it is a palindrome or not.

d) Write a program in C, to multiply two matrices.


Q.2. a) Write the steps involved in the top-down design process with the help of a diagram.

b) Write a program in C (using files) to open the "file1", read the contents and copy the same into "file2".


Q.3. a) mention any three advantages of use of pointers over arrays. Also, write a program (using pointers) to insert and delete an element in an ordered list.

b) Write a program to do the following without the use of any string functions like strcat or strlen:

i) Concatenate two strings

ii) To find the length of any given string


Q.4. a) What is a preprocessor directive? Write the syntax for the following preprocessor conditional statements:

i) # if def

ii) # if n def

iii) # else

iv) # pragma

Also, mention an example for each.

b) Design an algorithm and draw corresponding flowchart to convert a decimal number to its binary equivalent.


Q.5. a) Mention the rules for using the Big-O notation

b) What is a variable? What are the rules to be followed to name a variable in "C"? Write the syntax to declare the variable. Also, mention how to initialize a character variable with the help of an example.

c) Write a program to sort the given list of 10 numbers in ascending order.

 



 

 

 
 

MCS-11 Main page          Previous Paper    Next Paper

 

UNIVERSAL TEACHER PUBLICATIONS
Web: universalteacherpublications.com, universalteacher.com, universalteacher4u.com