Set of multiple choice questions about programming with P7 prize

Current programming is no longer strange to us. Programming work is becoming hot and more interested. Please join the Network Administrator to learn about programming skills through multiple-choice questions below.
  1. Question 1. What is the result of printing to the screen of the following expression: -3 + 4% 5/2.
    1. -first
    2. -3
    3. first
    4. Other results
  2. Question 2. There are the following declarations: int x = 15; int * p; Want to p is the pointer to x must execute any command:
    1. p = x;
    2. p = & x;

    3. p = * x;
    4. All commands are correct
  3. Question 3. If there are the following statements:
     char msg [10]; 

    char value;

    Which sentence is correct?
    1. msg [2] = value;
    2. msg = value;
    3. Both sentences are wrong
    4. Both are true
  4. Question 4. If there are the following statements:
     char msg [10]; 

    char * ptr; char value;
    Which sentence is correct
    1. ptr = value;
    2. ptr = msg;
    3. Both are true
    4. Both are wrong
  5. Question 5. Any sign that is the pointer of the third element of a film has 4 characters:
    1. * (a + 3);
    2. * (a + 2);
    3. * a + 3;
    4. * (a + 4);
  6. Question 6. For the following statements:
     void * tongquat; 

    int * nguyen; char * kitu;
    Which assignment is invalid:
    1. tongquat = nguyen;
      1. * nguyen = * tongquat;
      1. kitu = (char) tongquat;
    2. tongquat = kitu;

  7. Question 7. Indicate the results of the following program section:
     int p = 4; 

    p = 10 + ++ p;
    1. 14
    2. 15
    3. 16
    4. Other results
  8. Question 8. There are the following declarations, which declaration is correct:
     char tb, bearing [15]; 

    1. tb = 'hello   b n ';

      1. gets (bearing);
      1. bearing = 'chaoban';
      1. gets (tb);
  9. Question 9. Adding a pointer to an integer will be:
    1. A pointer has the same type
    2. An integer
    3. Both results are correct
      1. The two results are wrong
  10. Question 10. Subtraction of 2 pointers with the same type will be:
    1. A pointer has the same type
    2. An integer
    3. Other results
    4. Not possible
4 ★ | 1 Vote