P13 programming set of multiple choice questions
You 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.
- Question 1. To declare a function to check an array is increasing or not we use the following statement:
- void CheckAsc (int a [], int n);
- int CheckAsc (int * a, intn);
- long CheckAsc (int * S);
- double CheckAsc (int S [], intn);
-
- Question 2. Which code will permutate 2 numbers a and b:
-
t = a; a = b; b = t;
- t = a; a = b; t = b;
- a = t; b = a; t = b;
- t = b; b = a; a = t;
-
- Question 3. In the following sentences, which sentence is correct:
-
The value of a variable can be changed.
- The value of a variable cannot be changed
- It is possible to declare two variables with the same name in the same function.
- Cannot declare 2 variables with the same name in the same function.
-
- Question 4. Symbols that characterize the impact on data are called:
- Operator
- Expression.
- Jaw
- Turn
-
- Question 5. The size of the pointer variable is:
- 1 byte.
-
2 bytes
- 3 bytes.
- There is no right answer
-
- Question 6. Indicate the value of the expression: 2 + 4> 2 && 4 <2;
- first
- -first
- 0
- There is no right answer
-
- Question 7. What is the logical value of the following expression:! (1 && 1 || 1 && 0);
- first
- 0
- -first
- There is no right value
-
- Question 8. Select the expression representing num as the number between 1 and 9 but it must be 4:
- num> 1 && num
- num> 1 || num
-
num> = 1 && num <= 9 && num! = 4;
- No sentence is correct
-
- Question 9. Find the results of the following program:
{
int n;
for (n = 18; n> 0; n / = 2)
printf ('% 3d', n);
};- '18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 '.
- '18 9 4 2 1 '.
- '18 9 4 2 1 0 '.
- No answer right
-
- Question 10. Find the results of the following program:
#include
main ()
{
int i, ch;
for (i = 0, ch = 'A'; i <5; i ++, ch ++) putchar (ch);
};- 'ABCDE'.
- 'ABC'.
- 'ACEG'.
- No answer right
-
- Question 11. Find the results of the following program:
#include
main ()
{
int i, ch;
for (i = 0, ch = 'A'; i <4; i ++, ch + = 2) putchar (ch);
};- 'ABCDE'.
- 'ABC'.
-
- 'ACEG'.
- No answer right
-
- Question 12. Which of the following is correct if the declaration is made:
char * ptr;
char msg [10]; char v;- ptr = v;
- ptr = msg;
- Both sentences are true
- No sentence correctly
-
- Question 13. Why are the functions scanf () and printf () called 2 import and export functions in the format:
- Because they have a format string in the parameter.
- They are often used to import and export values in a predetermined style.
- The above two functions are not two formatted export functions.
- Another reason
-
- Question 14. Which of the following functions belongs to unformatted import functions:
printf ();
scanf (); getchar (); putchar ();- 1 and 2
- 3 and 4
- 1 and 4
- 2 and 3
-
- Question 15. If strcmp (S1, S2) returns a negative integer, then:
- The content of S1 series is larger than the content of the S2 series
- Chain content S1 is smaller than the content of series S2.
- The content of chain S1 is equal to the content of chain S2.
-
Data entered is not properly formatted
-
4 ★ | 1 Vote
You should read it
- Set of multiple choice questions about programming with P12
- Set of multiple choice questions for programming with P15 prize
- Set of multiple choice questions about programming with P10 prize
- Set of multiple choice questions about programming with P7 prize
- Set of multiple-choice questions on award-winning programming P5
- Set of multiple choice questions about programming with P6
- 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
- Set of multiple choice questions on programming with P3 prize
- Set of multiple choice questions about programming with P17 prize