Set of multiple choice questions on programming with P9

Multiple choice questions about programming help you gain more useful knowledge for yourself in the process of learning and working. There will be 10 questions for you to test your knowledge. Let's start.

  1. Question 1. What determines the size of the memory allocated to variables:
    1. Variable name
    2. Data type of variable
    3. Value of variable
    4. All right
  2. Question 2. What are the results of the following program:
     #include 

    void main ()

    {

    int i, k;

    for (i = 1;; ++) k = 5; printf ('% d', i);

    };
    1. 0
    2. 5
    3. Infinite loop
    4. Other results
  3. Question 3. What are the results of the following program:
     #include 

    void main ()

    {

    int i = 1, k = 0;

    for (; i <5; i ++) k ++; printf ('% d', k);

    }
    1. 0
    2. 4
    3. 5
    4. Infinite loop
  4. Sentence 4. Which of the following commands allows to jump out of the loop to any desired position:
    1. break
    2. tiếp tục
    3. goto

  5. Question 5. In the following functions, which functions are not formatted to print a character to the screen:
    1. puts ();
    2. printf ();
    3. putchar ();

    4. Only B and C
  6. Question 6. What are the results of the following program:
     #include 

    #include void main ()

    {

    clrscr (); int i;

    for (i = 1; i <= 24; i ++); printf ('n% d', i); getch ();

    return;

    };
    1. Print the screen numbers from 1 to 24
    2. Error while building the program
    3. Print the screen numbers from 1 to 24, one line at a time
    4. Another result
  7. Question 7. What is the fflush (stdin) command used for:
    1. Read characters from the keyboard
    2. Clear the cache
    3. Clear the cache
    4. Other results
  8. Question 8. What are the results of the following program section:
     char c; int n; 

    scanf ('% d% c', & n, & c); If typing: '10 T '.
    1. n = 10, c = ''
    2. n = 10, c = 'T'
    3. Error while building the program
    4. Other results
  9. Question 9. Print results to the screen of the following program:
     #include 

    void main ()

    {

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

    };
    1. 'd'
    2. 'D'
    3. '100'
    4. Other results
  10. Question 10. How can the hang be defined:
    1. #define string
    2. const name_volume_value = value;
    3. There is no way to define
    4. A and B
Update 24 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile