Computer Programming C/ C++ Previous-Paper 2012
Khyber Pakhtunkhwa Board of Technical Education Peshawar
Post Inter Diploma in Information Technology (New Course)
(1st Semester)
1st Term Examination 2012
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:-State the structure of a C / C++ program.
Q.2:-What are C/C++ data types?
Explain the following data types also write how they are declared.
i) Boolean type
ii) Character type
iii) Integer type
Q.3:-a)What do you mean by character constant? Give one example.
b)What is 3 string constant? Explain with the help of one example.
Q.4:-a)Define and explain Variable.
b)Write the rules for constructing variable names.
Q.5:-Write the purpose of the following functions in one line.
a) get ( ) function
b) put ( ) function
c) getch ( ) function
d) putch ( ) function
e) gets ( ) function
Q.6: -State about output using cout and input using cin by giving one example.
Q.7: – a) What is a Do-While loop. Explain with the help of an example.
b) What is a break statement? Give one example.
Q.8:- a) What does relational operator do, list its different types.
b) Write a C++ program to print first ten numbers.
Note:– In the above related questions example means write a sample C++ program.
Related Posts
Interesting Stuff in your Inbox
Subscribe to our mailing list to get interesting stuff and updates right in your email inbox. Promise, we will never sell your info to any third party.
Elf Mastery by Bryant Reil
Prepare to be whisked away to a realm where creatures of myth and legend shape the destiny of our world. Join Kyla Nim, along with her extraordinary friends, as they confront the malevolent god of darkness. Can they save the Earth from eternal night? Order your copy of "Elf Mastery" today!