Skip to content
πŸ“š Free notes, MCQ tests & past papers β€” FBISE & BISE Rawalpindi
πŸ“’ Latest Updates

ECAT Computer Science (ICS) Chapter 7: Programming in C MCQs Online Test 2027

Reviewed by Sadia Shahid, Senior Science teacher (Maths, Physics, Chemistry, Biology, Computer Science)

For ICS students taking UET ECAT with Computer Science in place of Chemistry: this free test covers Programming in C with 25 MCQs, written by our teachers to the FSc (ICS) Computer Science syllabus, with answers and explanations.

Choose Practice mode to see each answer and explanation straight away, or Exam mode for a timed attempt (one minute per question). Questions and options are shuffled on every attempt, and after submitting you can review only the questions you got wrong.

Last reviewed: 24 November 2026 Β· Syllabus: FSc Part I and II (Punjab Textbook Board), the base for UET ECAT and the NUST NET engineering stream.

Computer Science in ECAT

UET offers combinations such as Mathematics, Physics and Computer Science, and Mathematics, Statistics and Computer Science. Computer Science then carries the same share as Chemistry: 30 of the 100 MCQs. NUST NET (Engineering and Computing) does not have a separate Computer Science section.

Programming in C: 25 MCQs

0/25 answered

Practice mode shows the answer as soon as you choose. Exam mode gives one minute per question and shows results at the end.

1. The output of: int a = 10; if (a β€Ί 5) printf(β€œYes”); else printf(β€œNo”); is:

βœ” 10 β€Ί 5 is true.
Report a mistake

2. For int a(10);, the last valid index is:

βœ” 0 to 9.
Report a mistake

3. The switch statement in C is used for:

βœ” Each case is a possible value.
Report a mistake

4. The size of char in C is:

βœ” It stores one character.
Report a mistake

5. Which is a valid variable name in C?

βœ” Must start with a letter or underscore; no spaces; not a keyword.
Report a mistake

6. The loop that executes at least once is the:

βœ” The condition is checked after the body.
Report a mistake

7. The operator == is used for:

βœ” = is assignment.
Report a mistake

8. The continue statement:

βœ” The next iteration begins.
Report a mistake

9. An array in C is:

βœ” Accessed by an index.
Report a mistake

10. The statement used to exit a loop immediately is:

βœ” Control goes to the statement after the loop.
Report a mistake

11. Every C program must have the function:

βœ” Execution begins at main().
Report a mistake

12. If x = 5, then after x++ the value of x is:

βœ” ++ increases by 1.
Report a mistake

13. The statement terminator in C is the:

βœ” Each statement ends with ;
Report a mistake

14. How many times does β€œfor(i = 0; i β€Ή 5; i++)” run its body?

βœ” i = 0, 1, 2, 3, 4.
Report a mistake

15. The value of 7 % 3 in C is:

βœ” % gives the remainder.
Report a mistake

16. The logical AND operator in C is:

βœ” Both conditions must be true.
Report a mistake

17. A function that does not return a value has return type:

βœ” e.g. void display().
Report a mistake

18. C language was developed by:

βœ” At Bell Labs in 1972.
Report a mistake

19. The format specifier for an integer in printf is:

βœ” %f for float, %c for char.
Report a mistake

20. The output of printf(β€œ%d”, 5 β€Ί 3); is:

βœ” True is printed as 1.
Report a mistake

21. The index of the first element of a C array is:

βœ” Arrays are zero-indexed.
Report a mistake

22. A comment in C can be written as:

βœ” Also // for single lines in newer C.
Report a mistake

23. The value of 7 / 2 in C (both integers) is:

βœ” Integer division drops the fraction.
Report a mistake

24. The format specifier for a float is:

βœ” e.g. printf(β€œ%f”, x).
Report a mistake

25. The header file needed for printf() and scanf() is:

βœ” Standard input/output.
Report a mistake

More practice: all Computer Science tests Β· all ECAT and NUST NET tests

Please confirm all dates and figures on the official websites: ecat.uet.edu.pk and ugadmissions.nust.edu.pk

Preparing for ECAT or NUST NET 2027? Join our live online classes for FSc Mathematics, Physics and Chemistry. Book a free demo class.

πŸ“Œ Struggling with this chapter? Join our live online tuition β€” one-to-one or small group classes with experienced teachers. Book a free demo class β†’

Ask a question about this topic

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