P13 programming set of multiple choice questions
- 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 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
May be interested
- What test you know about operating system P11please read your knowledge and the following multiple choice questions of network administrator. hope with these questions will give you lots of useful information.
- Are you confident with your Network Administration knowledge P6please read our below knowledge and network admin questions. the question set will have 12 sentences for you to try.
- Multiple choice questions about Photoshop P17in addition to mastering the skills, you also need to supplement yourself with useful knowledge when working with photoshop. in the quiz below, join the network administrator and learn and play with the following interesting questions.
- JAVA test on P6multiple choice questions about java programming give you useful knowledge. if you love java programming, don't skip the series of interesting tests below by network administrator.
- Set of multiple choice questions on programming with P14 prizeyou are a regular person writing about programming code, so are you confident with your knowledge? try checking with our multiple choice questions below.
- What test you know about operating system P12you love to learn the knowledge about the operating system. if you feel depressed when reading long articles, try the following multiple choice questions of network administrator. there are many good quizzes to learn.