اردو

Home / Practice / Programming in C / Worksheet

Practise online

Programming in C

Class 11 · Computer Science · 6 questions

Name: ____________________   Date: ____________

  1. Which symbol ends a statement in C?

    • A :
    • B .
    • C ;
    • D !
  2. The function where C program execution starts is:

    • A begin()
    • B run()
    • C start()
    • D main()
  3. Which header file is needed for printf?

    • A math.h
    • B conio only
    • C stdio.h
    • D string.h
  4. The data type for whole numbers in C is:

    • A float
    • B char
    • C double
    • D int
  5. What is the value of 7 % 3 in C?

    • A 0
    • B 3
    • C 1
    • D 2
  6. Which loop checks its condition after running the body at least once?

    • A if
    • B for
    • C do while
    • D while

Answer key

1. C, 2. D, 3. C, 4. D, 5. C, 6. C

  1. A semicolon ends a statement.

  2. Execution begins at main.

  3. printf is declared in stdio.h.

  4. int stores integers.

  5. The remainder of 7 divided by 3 is 1.

  6. A do while loop runs first and tests afterwards.