Computer Programming C/C+ Previous Paper 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
1 2
1 2 3
1 2 3 4
Related Posts
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!