-
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
-
programming exercises
web programming
computer programming
multiple choice
mobile programming
programming languages
programming applications
iodine programming
4.5 ★ | 2 Vote