Computer Programming C/C+ Previous Paper 2015


0
Categories : DIT , DIT Previous Papers 2015

Khyber Pakhtunkhwa Board of Technical Education Peshawar
Diploma in Information Technology
(Part -I)
1st Term Examination 2015
Paper: Computer Programming C/C+ 

Time allowed: 3 hours

Max marks: 100

Note: Attempt any live questions. All questions carry equal marks. Mobile phone & Programmable calculators are not allowed. 

Part – A 

Q1:- Differentiate any five pairs from given.

i) Signed and unsigned integer
ii) STRLWR () and STRUPRO)
iii) Break and continue statement
iv) Prefix and postfix operator
v) execution time value assignment and run time value assignment

Q2: Write short notes on any two from the following with example

1) for loop
2) processor directive
3) arithmetic functions

Q3: Write body structure for any five from the given

i) NESTOD if-else statement
ii) while loop
iii) GOTO statement
iv) declaration of user defined function
v) print
vi) C/C++ program structure

Q4: Write output for any four from given logics. 

i) int a=5, b=10;
printf(=b%a5%d/n”, b%a);
ii) int n= 10
char=”*”
printf(“%d”,ch)
printf (%c”,chi);
iii) int I,j ;
for (i=1;i<5;i++)
for(j=1;j<= 1,391)
Printf(“*”);
Printf (“n”)
iv) printf(“%f’, ceil(9.9);
v) printf(“%”, pow (5,2));

Part-B

Q5: Write program that take a numb3er from user and show whether it is odd or even using if-else statement
Q6: Elaborate while and do while loop in detail with one example.
Q7: Elaborate user defined words and reserve words with examples
Q8: Elaborate input and output statements. Also write down two functions of each statement.

Related Posts

Like, Share, and Follow Us!

Leave a Reply

Your email address will not be published.

Copyright © 2022 Basics of Computer