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.

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

    2. '% e'.
    3. '% o'.
    4. '% p'.
  3. Question 3: Which of the following formats is used to print an integer:
    1. '% u'.
    2. '% e'.
    3. '% d'.
    4. '% p'.
  4. Question 4. Which of the following format is used to print a real number with double precision:
    1. '% u'.
    2. '% e'.
    3. '% o'.
    4. '% p'.
  5. Question 5. Which of the following formats is used to print a single precision number:
    1. '% u'.
    2. '% e'.
    3. '% f'.
    4. '% o'.
  6. Question 6. The int data type (integer type) can handle integers in any range:
    1. 0 . 255.
    2. -32768 . 32767.
    3. -128… 127.
    4. 0 . 65535.
  7. 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:
    1. (c = a & b)
    2. (c = a && b)
    3. (c = a / b)
    4. (c = a <
  8. Question 8. Suppose a and b are 2 real numbers. Which of the following expressions is not allowed:
    1. (a + = b)
    2. (a- = b)
    3. (a >> = b)
    4. (a * = b)
  9. Question 9. Give a = 3, b = 2. Which variable c = (a << = b) will have the following values:
    1. c = 9
    2. c = 12. [c = (a = (a << = b)) = (a = a.2b)]
    3. c = 6
    4. c = 8
  10. 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
    }
    1. 56
    2. 100
    3. Error message when building the program
    4. Other results
Update 24 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile