TipsMake

Test about programming C P3

Multiple choice questions on C programming, invite readers to test their knowledge with Network Administrator. Hopefully with these questions you will have more useful knowledge.

  • Question 1: In 256 color mode, the number of bits for each pixel is:
    • 6
    • 7
    • 8
    • 9
  • Question 2: Which of the following formats is used to print the address of a variable:
    • % u '.

    • '% e'.
    • '% o'.
    • '% p'.
  • Question 3: Which of the following formats is used to print an integer:
    • '% u'.
    • '% e'.
    • '% d'.
    • '% p'.
  • Question 4. Which of the following format is used to print a real number with double precision:
    • '% u'.
    • '% e'.
    • '% o'.
    • '% p'.
  • Question 5. Which of the following formats is used to print a single precision number:
    • '% u'.
    • '% e'.
    • '% f'.
    • '% o'.
  • Question 6. The int data type (integer type) can handle integers in any range:
    • 0 . 255.
    • -32768 . 32767.
    • -128… 127.
    • 0 . 65535.
  • Question 7. Let a = 3, b = 2 and c are 3 integer variables. Which of the following expressions incorrectly writes the syntax in the C programming language:
    • (c = a & b)
    • (c = a && b)
    • (c = a / b)
    • (c = a <
  • Question 8. Suppose a and b are 2 real numbers. Which of the following expressions is not allowed:
    • (a + = b)
    • (a- = b)
    • (a >> = b)
    • (a * = b)
  • Question 9. Give a = 3, b = 2. Which variable c = (a << = b) will have the following values:
    • c = 9
    • c = 12. [c = (a = (a << = b)) = (a = a.2b)]
    • c = 6
    • c = 8
  • Question 10. What is the result displayed on the screen of the following program
     #include void main () 

    {

    int a, b; a = 100; b = 56;

    printf ( ' % d ' , (a
    }
    • 56
    • 100
    • Error message when building the program
    • Other results

Discover more

C programming language multiple choice programming technology programmer programming test
Isabella Humphrey

Share by

Isabella Humphrey
Update 24 May 2019