You are on page 1of 3

B. Tech (III Trimester) B.

Tech (CS/IT/EC/BIOTECH) Main Examination, July-2009 Paper Computer Programming


Roll No.: ____________ Time Allowed: 3 hours Paper code: 100/9 Maximum Marks: 60

The question paper has FIVE questions. There is an internal choice in each question. Students are required to attempt all five questions. Each Question carries equal marks. Q. 1 (a) what is programming language? Differentiate between High level language & Low level language. (4) (b) What is algorithm? Write an algorithm for calculating factorial of the given number. (8) OR (c) Explain the various Data types used in C Programming. (4) (d) Define Flow Chart. Draw a flow chart to find out largest no in a given list of 10 no. (8) Q. 2 (a) what is storage class? Explain all the storage classes with an Example. OR (b) Explain arithmetic & logical operators used in C. Also make their priority chart. (Precedence order) (6) (c) Write a program to find out whether a no is Prime or not. (6) Q.3 (a) Explain how the for loop works. (b) Write a program to print the following pattern in C * * * * * * * * * * * * * * OR (4) (12)

(8)

(c) Explain how while loop works. Differentiate between while & do-while loop. (4) (d) Describe the output generated by each of the following C program. (Ignore syntax error if found) (4*2) (i) main() { int n=20,a=2; while(a<n) { printf(%d,a); a*=a--; } } (ii) main() { int x=10,y=6,z; z=x-- -y; printf(%d%d%d,x,y,z); } (iii) main() { int x=10,y=20; if(x = = y); printf(%d%d,x,y); } (iv) main() { int x=3,y=3.0; if(x = = y) printf(x & y are equal); else printf(x & y are not equal); } Q. 4 (a) what is Function? Explain call by Value & call by Reference with an Example. (12) OR (b) What is Array? Describe 1D & 2D array. (c) Write a program to short a given integer array. Q.5 Write short notes (any four) with an example. (a) Recursive function (b) String copy function (c) Pointer in C (4) (8) (4*3)

(d) Structure (e) Union (f) fopen() & fclose() function.

You might also like