Computer Programming C / C + + Previous Paper 2022

Khyber Pakhtunkhwa Board of Technical & Commerce Education Peshawar
Diploma in Information Technology
(Part -I)
1st Term Examination 2022
Paper: Computer Programming C / C + +
Time allowed: 3 hours
Max marks: 50
Attempt any five questions. All questions carry equal marks.
Q.1: Write the advantage of C language.
Q.2: What are reserved words? Explain its usage with the help of program example.
Q.3: Write a C program using while loop that takes an integer for a variable X, and Return the sum of all the numbers from I to X. Hints: X=3, should return 6 which is 1+2+3
Q.4: Explain the purpose and syntax of the following Functions.
a) Putch () b) getch (). c) getche (). d) gets ().
Q.5: Write a C program that input Five-digit number, into its individual digits and print the digits separated from one another by three spaces each. Hints: for example, if user types in 42321, the program should print 4 2 32 1.
Q.6: Write a C program to find out maximum value from three integer values, using conditional operator.
Q.7: Explain the syntax of if else statement with suitable program example.
Q.8: Write short note on the following.
a) Size of () operator.
b) Priority of operators.
Related Posts
4 comments on “Computer Programming C / C + + Previous Paper 2022”
Leave a Reply
Cancel reply
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!
Hameed ullah
it is good
asmat ullah khan hadreey
thanks alot
Seraj mehmood
Student
Md. U
Thanks for contacting us. How we can help you?