K. K. Wagh Polytechnic, Nashik – 3 Semester – II
Practice test – 1 Academic year – 2007-2008 Subject: Programming in C [9017]
================================================================= Name:______________________________________________ Roll No.:_________ Class:____________
Marks obtained out of 20:
Date of the Exam:-
Examiner’s sign:_____________
Note: All the questions are compulsory. Q.1
Attempt any two. (2*2) 1. Give the syntax of scanf( ) function.
4
Ans:
2. What is constant? Give any two examples. Ans:
3. Enlist different format specifiers. Ans:
Q.2
Attempt any two. (4*2) 1. Write the appropriate syntax of switch-case statement.
8
Ans:
2. Write a program to find whether the entered number is negative and even or not using nested if-else. Ans:
Ans:
Q.3
3. Write a program to accept fahrenheit temperature and print its centigrade equivalent temperature on the screen. TF = Fahrenheit Temp. TC = Centigrade Temp. TC = (TF − 32) × 5/9
Attempt any two. (4*2) 1. Explain: Relational operators.
Ans:
2. Write the rules for writing variables names. Ans:
3. Differentiate among unary, binary and ternary operators. Ans:
8