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
- Set of multiple choice questions about programming with P12the programming test questions below will provide you with useful knowledge on this topic. if you want to study programming, you should not ignore the series of programming tests of network administration.
- Set of multiple-choice questions on award-winning programming P5serializing programming tests, in the following article, readers will be able to expand their knowledge with more interesting questions. let's start.
- Set of multiple choice questions about programming with P10 prizethe programming questions below will give you lots of useful information. if you are interested in learning programming languages, the series of programming language topics will be very helpful for you.
- Set of multiple choice questions for programming with P15 prizeprogramming is a discipline that attracts many young people interested. not only that job opportunities after graduation with this job are extremely open. so, if you love programming, you should not ignore the following quiz series of network administrator.
- Multiple choice questions about Javascript languageif you are a beginner of these programming languages, the following multiple-choice questions of network administrator will be very suitable for you to support knowledge.
- Guide to creating multiple choice questions on VnEduone of the outstanding features of vnedu is to create multiple choice questions quickly. using vnedu, teachers will not worry about test questions that are identical to multiple choice questions, can add and edit questions easily to make midterm or final exam questions, ...
- P13 programming set of multiple choice questionsyou are a fan of programming languages and want to learn more about this topic. to give you an interesting reading about programming, in this article, the network administrator will send you a good quiz about this topic. invite your reference.
- A set of JavaScript multiple-choice questions has P4 answersplease read your knowledge and multiple choice questions around the javascript topic that the network administrator has edited below. the set of questions includes 10 sentences to try.
- A set of JavaScript multiple-choice questions with P2 answerslocated in the series of tests on programming languages, in the basic knowledge test below network administrators will send you questions with javascript topics.
- Test on JAVA test P7a set of multiple-choice questions about java gives you useful knowledge for work and study. the set of questions below includes 10 sentences for you to experience.