Set of multiple-choice questions on award-winning programming P5

Serializing programming tests, in the following article, readers will be able to expand their knowledge with more interesting questions. Let's start.

  1. Question 1. Suppose there is a ch = 'A' statement. So how many bytes will it contain:
    1. first
    2. 2
    3. 3
    4. 4
  2. Question 2. Suppose there is a command ch [] = "A". How many bytes are included:
    1. first
    2. 2
    3. 3
    4. 4
  3. Question 3. Print results to the screen of the following program:
      #include void main () 

    {

    int ch = 'A'; printf ('% d', ch);

    }
    1. A
    2. a
    3. 65
    4. Other results
  4. Question 4. Result of the following program:
      #include 

    void main ()

    {

    int i = 98; printf ('% c', i);

    };
    1. B
    2. b
    3. 98
    4. Other results
  5. Question 5. Print results to the screen of the following program:
      #include 

    void main ()

    {

    int i = 5, j = 6; i = i- --j;

    printf ('% d', i);

    };
    1. 6
    2. 5
    3. first
    4. 0
  6. Question 6. The general form of printf () function is: printf ('array of specifications', sequence of expression code); In it, the code set will be:
    1. The range of data format codes displayed
    2. Cursor of string of characters
    3. Character strings are informative
    4. All 3 answers above
  7. Question 7. In the following functions, which function is an unformatted function to enter a character from the keyboard
    1. scanf ()
    2. getchar ()
    3. getch ()
    4. getche ()
  8. Question 8. In the following functions, which function to enter a character from the keyboard immediately after typing, do not wait press Enter and do not show the screen:
    1. scanf ()
    2. getchar ()
    3. getch ()
    4. getche ()
  9. Question 9. Which function reads the character from the keyboard immediately after typing, without waiting for pressing Enter. The characters appear on the screen:
    1. canf ()
    2. getchar ()
    3. getch ()
    4. getche ()
  10. Question 10. What is the following screen print result of the program:
      #include 

    void main ()

    {

    int i;

    for (i = 2; i <= 4; i + = 2) printf ('% 3d', i);

    };
    1. '1 2 3 4'
    2. '2 3'
    3. ' 2 '
    4. The program cannot run

You've just finished reading the article "Set of multiple-choice questions on award-winning programming P5" edited by the TipsMake team. You can save set-of-multiplechoice-questions-on-awardwinning-programming-p5.pdf to your computer here to read later or print it out. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.

« PREV Microsoft Access has a P2 answer
NEXT » What do you know about computer pairing techniques?