www.andhrauniversity.info Andhra University : MCA Model Question Paper
Andhra University
MCA 1.1.3 PROBLEM SOLVING AND PROGRAMMING USING C
Model Paper
First Question is Compulsory
Answer any four from the remaining and All questions carry equal marks
All parts of any Question at one place.
Time: 3 Hrs. Max. Marks: 70
1) Answer the following:
a) What is an algorithm?
b) Write any two data types in C with examples.
c) How are logical operators written in C?
d) What are bit wise operators in C?
e) Give an example to illustrate the concept of structures in C.
f) What is hash searching?
g) How do you declare an array of 10 pointers pointing to integers?
2. a) Write an algorithm for swapping two elements without using an extra temporary variable.
b) Write a C program to convert a given decimal number to binary.
3. a) What are the control structures in C? Give a n example each.
b) Write a C program to sort a set of n elements using bubble sort.
4. a) Declare a 12-element array of pointers to functions. Each function will accept two pointers to double-precision quantities as arguments and will return a pointer to a double-precision quantity.
b) Write a program to find the transpose of a given n x n matrix A. The matrix A should be declared using pointers. Your program should store the resultant in A only. No additional matrix be used.
5 a) Write a C Program to find the Kth smallest element of a given array.
b) Explain how your program works for finding the 4th smallest element of the following data: 11, 2, 9, 4, 2, 7, 3, 3, 11, 8, 14, 6.
6.a)What are command line arguments? Explain.
b) Write a program that reads a line of text from a data file character by character and displays the text on the screen.
7.a) Write a C program for hash searching using linear collision.
b) Illustrate the Program for the following data:
10, 12, 20, 23, 27, 30, 31, 39, 42, 44, 45, 49, 53, 57, 60.
8.a) Write a program for Towers of Honoi problem using recursion.
b) Write a program to count the number of vowels in a given string.