You are on page 1of 1

*Model Question Paper

Subject Code:R13105/R13 I B. Tech I Sem Regular Examinations Feb./Mar. - 2014

COMPUTER PROGRAMMING
Time: 3 hours
Question Paper Consists of Part-A and Part-B Answering the question in Part-A is Compulsory, Three Questions should be answered from Part-B ***** PART - A 1. (a) What are the values of x++ and ++x if the value of x is 5? Justify. (b) Write a C program to read a text and count all the occurrences of a particular letter given by the user. (c) Write a recursive function that returns a value of 1 if its string is palindrome. (d) Explain the effects of the following statements (i) int a, *b=&a; (ii) a= (float *) &x; (e) Define a structure type named data that can hold a single string of up to 20 characters. (f) Write a program to copy one existing file into another named file. [3+4+4+4+3+4] PART- B 2.(a) (b) 3.(a) (b) 4.(a) (b) 5.(a) (b) 6.(a) (b) Give the flow chart to determine sum and average of n numbers entered from the keyboard. Demonstrate the storage of two dimensional arrays in memory with the help of a diagram. [6+10] What is a recursive function? What is the need for implementing recursion? Write a recursive function to find greatest common divisor of two integers. What are the uses of dynamic memory allocations? What happens if malloc(0) is called? [10+6] What is a NULL macro? What is the difference between a NULL pointer and NULL macro? What are the uses of null pointers? Write a C program to print substring within a string. [9+7] Demonstrate the use of fscanf() and fprintf() with an example. Explain how to initialize a structure, Accessing of a structure member. [8+8] n Calculate X using a recursive function. Write for loops for the following: (i) Reverse a given integer (ii) Accept n numbers from the keyboard and calculate their mean. [8+8] What are the types of access methods of files? Describe. Describe the bitwise operators in C. [8+8] Page 1 of 1

Max. Marks: 70

7.(a) (b)

You might also like