Computer Programming C/C+ Previous Paper 2016

Categories : DIT , DIT Previous Papers 2016

Khyber Pakhtunkhwa Board of Technical Education Peshawar
Diploma in Information Technology
(Part -I)
1st Term Examination 2016
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. 

Q1:   a) What is the difference between C and CH

b) Write the weakness of C.

c) Explain each part of the following.

i) int varint
ii) char varch = 65;

Q2: Write a program to find out the factorial of a number 6.

Q3: Write a program to display the square of even numbers of range with 1 to 20.

Q4:    a) Describe the relational and conditional operators with proper examples. 

b) What will be the output of the following progam?

Main( )


int k = 35:

Printf(“%d”d%d”, k==35, k=50.k>40);


Q5: Explain the following functions.

i) Scant ( )

ii) Print( )

iii) Gets( )

iv) Puts ( )

Q6: What is the difference between for loop and while loop

Q7: Explain with examples the following functions.

i) ABS ( ) 

ii) SQRT ()

iii) Strlen()

iv) exp( )

v) pow( )

Q8: Write a program to display the following outputs using a loop statement

1 2
1 2 3
1 2 3 4

Related Posts

Like, Share, and Follow Us!

Leave a Reply

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

Copyright © 2024 Basics of Computer