Computer Programming C/ C++ Previous-Paper 2014
Khyber Pakhtunkhwa Board of Technical Education Peshawar
Post Inter Diploma in Information Technology (New Course)
1st Term Examination 2014
Paper: Computer Programming C/C++
Time allowed: 3 hours
Max marks: 50
Note: Attempt any five questions. All questions carry equal marks. Mobile Phone & Programmable Calculators are not allowed
Q.1:- Define Language. Differentiate between C and C++ as Language
Q.2:- Differentiate between variables and constants. Explain their role in a program with an example.
Q.3:- Solve the following by applying priority of operators’ rules.
i) (a + b/2 * c – ( d + 4 )
ii) (a + b)/4*d^2 + c/2
Q.4:- Write the purpose of the following.
i) Printf ( ) , cout
ii) Putch (), Putchar ( )
iii) Getch ( ), getche ( )
iv) iostream , stdio
(v) Scanf ( ) , cin
Q.5:- Write the purpose of the following functions in one line.
a) printf ( ) function
b) putch ( ) function
c) getch ( ) function
e) scanf ()
f) gets ( ) function
Q.6:- Explain the difference between If-Else statement and Conditional operators with the help of program.
Q.7:- Write output of the given functions.
i) Sqrt ( )
ii) Floor ( )
iii) POW ( )
iv) tan ( )
v) Strlen ( )
Q.8:- Write short notes on following.
i) Variable definition rule
ii) Reserved Words
iii) main ()
Found your blog. Its really nice on C++ programming. Its a great tutorial for the beginners. Really liked it. Thank you for all the information.