How To Exam?

a knowledge trading engine...


Cochin University of Science and Techology (CUST) 2008-1st Year B.Tech computer programming - Question Paper

Saturday, 25 May 2013 07:55Web

BTECH 1st YEAR exam JUNE 2008

COMPUTER PROGRAMMING Max marks:100
Time:3 Hrs

PART A

1. a) List out five rules for naming variables.

b) provide the syntax of scanf statement & list out any four format specifiers.

c) List out any five system defined/Library functions.

d) describe true & formal parameters, with eg.What are the three rules to be followed
related to these arguments when a function call is made.

e) provide syntax of a structure. When do we use structures? provide eg. elaborate the
methods to create structure variables?

f) Declare a 1-Dimensional (1-D) array of size 100, to store integers. If the starting
location of the array is 3000, what is the address of the 13th element? provide a
generalized formula.

g) elaborate pointers? discuss with eg. How is the pointers linked with arrays?

h) Write short notes on : 1) kind def 2) enum

PART B

2. List out four categories of operators in C, with the list of five operators in every category.
provide the order of valuation of the operators in tabular format.
OR

3. Write a C program to obtain the prime no.s ranging from one & 100.(Give logic & eg)

4. a) Write a C program to obtain sum of integers 1,2,……..,n using recursion.(give
logic & eg)

b) List the scope, visibility, storage area, intial value & life time of register & auto
storage class in tabular format.
OR

5. a) discuss 1) Parameter passing by value 2) Parameter passing by reference.

b) Write a function “Large” in C to obtain the largest of n numbers, which receives an
array of no.s & number of numbers as parameters.
6. a) Write C program to do selection sort such that if no swapping happens in a pass,
sorting stops.

b) Write C program to initialize the upper triangular elements of a matrix with zero.

c) Why is union used? provide syntax.
OR

7. a) Write a C program using structures to store learner details like roll no., name, class,
sex, mark1, mark2, & total. The total mark is the sum of mark1 & mark2 & is
evaluated automatically. Search for those ‘girl’ students who have total> 75, presume
mark1 & mark2 are in 50.(give logic & eg)

8. a) Write a C program using command line arguments, to concatenate 2 strings
“HELLO” & “WORLD” provided at command line.

b) How does the execution of programs involving command line arguments differ from
other programs?

c) discuss what is the function of # include directive.
OR

9. a) elaborate pointers to structures? discuss with eg.

b) discuss any two preprocessor directive.

c) elaborate pointers to functions, discuss with eg?

---------------------------------





( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Cochin University of Science and Techology (CUST) 2008-1st Year B.Tech computer programming - Question Paper