Set of multiple choice questions for programming with P8 prizes
- Question 1. Which one math operation is used to determine the address of the object that the pointer points to:
- *
- !
- &
- Other results
-
- Question 2. Suppose when running the program, we type from the key: '29h b'. Print results n and c respectively will be:
#include void main ()
{
char c; int n;
scanf ('% d% c', & n, & c);
printf ('% 3d% c', n, c);
};-
'29b'
- '29h b'
- "29h '
- Other results
-
- Question 3. When declaring an array, we initialize the array as follows: int x [3] = {4,2,6}; Mean:
-
x [1] = 4, x [2] = 2, x [3] = 6
-
x [0] = 4, x [1] = 2, x [2] = 6
-
Not declared correctly
-
After all other
-
- Question 4. When the pointer variable does not contain any address, its value will be:
- O
- NULL
- Both results are correct
- Both results are wrong
-
- Sentence 5. Symbols specific to the impact on data are called:
- Jaw
- Expression
- Turn
- Operator
-
- Question 6. What are the results of the following program:
#include
void main ()
{
int x, * p;
x = 3; x = 6; p = & x;
* p = 9; printf ('% d', x); printf ('% d', * p); printf ('% d', x);
};- '369'
- '696'
- '999'
- Other results
-
- Question 7. Which of the following statements is true:
- Branching is the selection of one or more paths for the subsequent calculation
- Flowcharts can have many starting and ending points
- Character type contains a character enclosed in quotation marks
- In nested if statements, else belongs to the if closest to it
-
- Question 8. What are the results of the following program:
#include
int change (int * a)
{
* a = 10; return * a;
};
void main ()
{
int i = 5; change (& i); printf ('% d', i);
};- 5
- ten
- 0
- Error message when executing the program
-
- Question 9. What are the results of the following program:
#include
void main ()
{
int x, * p; x = 6; p = & x;
printf ('% d', x);
printf ('% d', * p);
};- 69
- 66
- Other results
- Error while executing the program
-
- Question 10. What are the results of the following program:
#include
void main ()
{
printf ('% d', 3
};- True
- 0
- first
- Other results
-
Discover more
programming
programming exercises
web programming
computer programming
multiple choice
mobile programming
programming languages
programming applications
iodine programming
Share by
Samuel Daniel
Update 24 May 2019
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 about programming with P6