Set of multiple choice questions about programming with P6
- Question 1. What is the screen printing result of the following program:
#include
void main ()
{
int i;
for (i = 2;; ++) printf ('% 3d', i);
};- Infinite loop
- ' 2'
- ' twelfth'
- Other results
-
- Sentence 2. Which of the following commands allows to be moved to a labeled place.
- break.
- goto.
- tiếp tục.
- exit.
-
- Question 3. Which of the following commands allows to stop the control statement:
- break.
- goto.
- tiếp tục.
- All 3 answers above
-
- Question 4. In C language, declare 'int array [3] [5]' which means:
- The elements of the array are integers
- A two-dimensional array of up to 15 elements and each element is an integer
- array [3] [5] is an element of the array
- All is wrong
-
- Question 5. Find errors in the following program:
#include
void main ()
{
int sum;
sum = 453 + 343
printf ('Ket la:' sum);
};- Missing semicolon (;)
- Missing comma (,)
- Missing specification character
- All 3 factors above
-
- Question 6. What are the results of the following program:
#include
void main ()
{
int i, j;
for (i = 1; i <4; i ++) j = i; printf ('% 3d', j);
};- "1 2 3 4".
- '4'.
- '3'.
- Other results
-
- Question 7. Priority for logical operators is:
- AND, NOT, OR.
- NOT, OR, AND.
- OR, NOT, AND.
- NOT, AND, OR.
-
- Question 8. What are the results of the following program:
#include
void main ()
{
int a = 40, b = 4;
while (a! = b)
if (a> b) a = ab; else b = three; printf ('% d', a);
};- 2
- 4
- 16
- Other results
-
- Question 9. Suppose in the C language using the declaration of 'double a [12]', element a [7] is the second element in array a:
- Friday
- Saturday
- 8th
- 9th
-
- Question 10. What are the results of the following program:
#include
void hoanvi (int * px, int * py)
{
int z; z = * px;
* px = * py;
* py = z;
};
void main ()
{
int a = 15, b = 21; Festival (a, b); printf ('% d% d', a, b);
};- '15 21 '
- '21 15 '
- Error message when executing the program
- Other results
-
- Question 11. What is the following program result:
#include
void hoanvi (int px, int py)
{
int pz;
pz = px; px = py; py = pz;
};
void main ()
{
int a = 15, b = 21; Festival (a, b);
printf ('% d% d', a, b);
};- '21 15 '
- '15 21 '
- Error message when executing the program
- Other results
-
- Question 12. Which of the following statements is not a benefit of using a function:
- Avoid redundancy, repeat a command repeatedly
- Easy to maintain
- Ability to reuse the command
- All the above are wrong
-
- Question 13. Declare variables: int m, n; float x, y; Which command is wrong:
- n = 5
- x = 10
- y = 12.5
- m = 2.5
-
- Question 14. Print results to the screen of the following program:
#include
void main ()
{
char * s;
s = 'waving boards'; strcpy (& s [5], & s [9]); printf ('% s', s);
};- 'hello'.
- 'hello'.
- 'ban ban'.
- 'Welcome board'.
-
- Question 15. Print results to the screen of the following program:
#include
void main ()
{
int a = 100, b = 6; double f;
f = (double) a / (double) b; printf ('% 2.2f', f);
};-
'16'.
-
'16 .00 '.
-
'16 .67 '.
- Other results
-
4.5 ★ | 2 Vote
You should read it
- Set of multiple choice questions about programming with P10 prize
- Set of multiple choice questions about programming with P7 prize
- P13 programming set of multiple choice questions
- Set of multiple-choice questions on award-winning programming P5
- Set of multiple choice questions on programming with P16 prize
- A set of multiple choice questions for programming has a P2 prize
- Set of multiple choice questions for programming with P8 prizes
- Set of multiple choice questions on programming with P14 prize
May be interested
- Multiple choice questions about network safety deployment have the answer P1below network administrator will send you multiple choice questions around the topic of network security. network security is a broad topic, full of knowledge, so the following questions will help you add many useful things.
- Test about computer architecture P6computer architecture is to design the basic concept and operational structure of a computer system. please join the network administrator to learn about this topic through multiple choice questions below.
- Test on C programming P4the c language is the most widely used computer language, along with the java language, the leading popular programming languages, widely used in modern developers. below, invite readers to test their knowledge on this topic through the multiple-choice questions below.
- Test of programming C P5if you are a fan of c programming language and intend to learn more about them, the following test of network administrator will be very suitable for you. let's learn and play with these interesting questions.
- What do you know about C # P3 programming language?c # is an object-oriented programming language developed by microsoft, the start of their .net plan. please invite the network administrator to learn about this topic through the quiz below.
- What do you know about C # P2 programming language?please read the knowledge with multiple choice questions around our c # programming topic below. the question set will have 10 sentences, 4 answers each and you should choose the correct answer.