Computer Programming C/ C++ Previous-Paper 2012

Categories : DIT , DIT Previous Papers 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

Like, Share, and Follow Us!

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2024 Basics of Computer