KLE Academy of Higher Education and Research 2007 M.C.A Computer Aplications MCS-011 : PROBLEM SOLVING AND PROGRAMMING - Question Paper
Thursday, 24 January 2013 03:05Web
Paper 1
Time : three hours Maximum Marks : 100
Note : ques. number one is compulsory. Attempt any 3 ques. from the rest.
1. (a) Write an algorithm and draw a corresponding flowchart to search a number in the provided list of numbers and also display its position.
(B) Write a Menu driven program in C to add, subtract and multiply 2 distances which are provided in feet and inches, [e.g. three ft nine inches + two ft five inches = six ft two inches]
C. Write a recursive program in C to obtain whether a provided 5 digit number is a palindrome or not.
(d)Write a program in 'C' to print automorphic numbers. The automorphic number is a number in which the square of the number contains the number in the end. Example : (a) five ; 25 (B) six ; 36
2.(a) Design an algorithm and draw corresponding flowchart to obtain all the prime numbers ranging from 2 provided numbers 'm' and 'n', where m, n > 0.
(b)Design an algorithm and write a program using 'C' to calculate transpose of a matrix.
3.(a)Write a program to process the marks for four courses in a semester. every course contains two components namely internal assessment and external exam. Students need to pass in both the components individually by acquiring at lowest 40% in order to declare successful completion in a course. calculate the total marks avg. and also display the Grade accordingly.
Note : You should use "Structures" concept.
(b)Write the functions to perform the subsequent :
(i) To accept a string and print the rightmost "n" characters.
(ii) To accept any 2 strings and check whether the 1st string is a substring of the 2nd string.
4.(a)Write a program in 'C to obtain the length of a provided string including blank spaces, tabs and other special symbols (new line character should be taken as a string terminating character).
Note : You should use "pointers" concept.
B) Write macros for the subsequent :
(i) To obtain the value of P [(1 + i) to the power n]
P, i, n are arguments of a macro and n is an integer.
(ii) To obtain the maximum of 2 numbers A, B where A and B are arguments of a macro.
5.(a)Write a program in 'C to append a few characters in an already existing file and also obtain the number of characters in the resulting file after appending.
(b)Design an algorithm and draw corresponding flowchart to convert a decimal number to its hexadecimal equivalent.
Earning: Approval pending. |