Set of multiple choice questions about programming with P7 prize

  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

May be interested

  • Set of multiple choice questions for programming with P8 prizesPhoto of Set of multiple choice questions for programming with P8 prizes
    following the series of quizzes around programming topics, below invite readers to test their knowledge with multiple choice questions that we have summarized below.
  • Multiple choice questions about Photoshop P7Photo of Multiple choice questions about Photoshop P7
    please read your knowledge with our multiple choice quiz around the following photoshop topic. with many questions related to how to use this software, you will definitely enjoy it.
  • Multiple choice questions about Photoshop P8Photo of Multiple choice questions about Photoshop P8
    photoshop is a complete software for handling professional digital images, containing the latest tools to work with images and new opportunities to implement creative ideas that can improve significantly. tells productivity. the following article will help you learn about this software through multiple-choice questions. let's start.
  • What do you know about PHP P1Photo of What do you know about PHP P1
    please read the knowledge and multiple choice questions around the topic of php programming. with basic questions related to this topic, hopefully readers will add more useful knowledge.
  • Multiple choice questions about Photoshop P3Photo of Multiple choice questions about Photoshop P3
    you love photoshop and want to learn more about this software, so try testing knowledge right away with our quiz below. you will certainly be provided with a lot of useful knowledge after completing this test.
  • Multiple choice questions about Microsoft Word 2010 have a P2 answerPhoto of Multiple choice questions about Microsoft Word 2010 have a P2 answer
    word 2010 is a very useful microsoft text editor. with significant improvements, users will get a lot of interesting experiences with text editing. please join the network administrator to learn about this topic through multiple choice questions.