You are on page 1of 2

9017

0809-I
3 Hours / 80 Marks Seat No.

Q.1 Attempt any EIGHT of the following 16


a) What do you by structure? Give syntax of declaring it.
b) State four relational operators with its meaning.
c) Give the meaning of declaration int *ptr;
d) Declare and initialize the one dimensional integer array with 10 elements.
e) State four printf format codes.
f) What is pointer?
g) Define recursion.
h) State the use of break statement.
i) State the use and syntax of strlen( ) function.
j) Explain conditional operator.

Q.2 Attempt any THREE of the following: 12


a) Write a program to display the sum of all even numbers from one to ‘n’.
Accept ‘n’ from user.
b) What is function? Explain the need of function.
c) Explain else – if ladder with example.
d) State the arithmetic and logical operators with its meaning.

Q.3 Attempt any THREE of the following: 12


a) Explain switch statement with flowchart.
b) What is the output of the following code?
void main( )
{
int i = 1, j = -1, k = 0, w, x, y, z;
w = i || j ||k ;
x = i && j && k ;
y = i || j && k ;
z = i && j && k ;
printf(« w=%d x=%d y=%d z=%d »,w,x,y,z) ;
}
c) Write a program using pointer to accept an integer array and print it in
reverse order.
d) Describe a method of declaring and initialization of two dimensional array
with example.

-1- CPR – (W’2008)


Q.4 Attempt any FOUR of the following: 16
a) Write a program to take marks of five subjects and display the total and
average.
b) Explain the concept array of pointers with example.
c) Explain strcpy( ) function.
d) Write a function to swap (exchange) the values of two integer numbers
using pointers.
e) Explain the working of do – while loop with example.
f) Write a program to accept a string and display the length of it without
using standard library function.

Q.5 Attempt any THREE of the following: 12


a) State four rules of choosing variable’s name.
b) Differentiate between do-while and while loop.
c) Write a program to find sum of digits of five digit integer number.
d) Explain with example the array of structure.

Q.5 Attempt any THREE of the following: 12


a) Write a program to find out largest number among 3 integer nos.
b) Write a program to define a structure employee with members emp_name,
emp_id and salary. Accept data for one employee and display it.
c) Explain pointer arithmetic with example.
d) Explain the meaning of following statements with reference to pointer:
int *ptr, m = 8;
*ptr = m;
ptr = &m;

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

-2- CPR – (W’2008)

You might also like