Computer Programming C / C + + Previous Paper 2022

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

4 comments on “Computer Programming C / C + + Previous Paper 2022

    Hameed ullah

    • February 23, 2023 at 4:07 am

    it is good

    asmat ullah khan hadreey

    • March 2, 2023 at 2:59 pm

    thanks alot

    Seraj mehmood

    • March 3, 2023 at 7:20 am


      Md. U

      • March 8, 2023 at 5:50 am

      Thanks for contacting us. How we can help you?

Leave a Reply

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

Copyright © 2024 Basics of Computer