اردو

Home / Practice / Class 11 / Computer Science / Programming in C

Programming in C

6 Class 11 Computer Science questions with answers and explanations.

Printable worksheet with answer key

All questions with answers
  1. Which symbol ends a statement in C?

    • 1 :
    • 2 .
    • 3 ;
    • 4 !
    Show answer

    Correct answer: ;

    A semicolon ends a statement.

    Report a mistake

  2. The function where C program execution starts is:

    • 1 begin()
    • 2 run()
    • 3 start()
    • 4 main()
    Show answer

    Correct answer: main()

    Execution begins at main.

    Report a mistake

  3. Which header file is needed for printf?

    • 1 math.h
    • 2 conio only
    • 3 stdio.h
    • 4 string.h
    Show answer

    Correct answer: stdio.h

    printf is declared in stdio.h.

    Report a mistake

  4. The data type for whole numbers in C is:

    • 1 float
    • 2 char
    • 3 double
    • 4 int
    Show answer

    Correct answer: int

    int stores integers.

    Report a mistake

  5. What is the value of 7 % 3 in C?

    • 1 0
    • 2 3
    • 3 1
    • 4 2
    Show answer

    Correct answer: 1

    The remainder of 7 divided by 3 is 1.

    Report a mistake

  6. Which loop checks its condition after running the body at least once?

    • 1 if
    • 2 for
    • 3 do while
    • 4 while
    Show answer

    Correct answer: do while

    A do while loop runs first and tests afterwards.

    Report a mistake

More Computer Science topics