Test about C programming

If you are a fan of this programming language, you can try your knowledge through our multiple-choice questions.

The C language is an imperative language developed from the early 1970s by Dennis Ritchie for use in the UNIX operating system. Since then, the C language has gradually been widely developed on many different operating systems. This is one of the programming languages ​​that programmers love to use. If you are a fan of this programming language, you can try your knowledge through our multiple-choice questions.

Question 1 : C programming language is developed by Dennish based on which programming language:

A. Language B.
B. BCPL language.
C. DEC PDP language.
D. Language B and BCPL.

Question 2 : When did the programming language given by Dennish?

A. 1967.
B. 1972.
C. 1970.
D. 1976.

Question 3 : Which programming language is the structured programming language?

A. Assembler language.
B. Languages ​​C and Pascal.
C language Cobol.
D. a, b and c.

Question 4 : Which of the following variable names are correctly written according to the naming rules of the C programming language?

A. diem
B. 3diemtoan
C. _diemtoan
D. -diemtoan

Question 5 : A variable is called a global variable if:

A. It is declared inside all functions, except for main ().
B. It is declared outside all functions including main ().
C. It is declared outside the main () function.
D. It is declared inside the main () function.

Question 6 : A variable is called a local variable if:

A. It is declared inside functions or procedures, including main ().
B. It is declared inside functions except for main ().
C. It is declared inside the main () function.
D. It is declared outside functions including main ().

Question 7 : If x is a global variable and x is not a pointer:

A. The memory area for x may change during program execution.
B. The memory area for x is only changed by operations with x inside main ().
C. The memory area for x will be changed by operations with x in all functions, including main ().
D. The memory area reserved for x is not changed during program execution.

Question 8 : Which of the following data types is considered to be the basic data type in programming language C:

A. Double type.
B. Cursor type.
C. Match type.
D. Plate type.

Question 9 : Suppose a and b are two real numbers. Which of the following expressions does not follow the syntax of C programming language:

A. (a + = b).
B. (a * = b).
C. (a = b).
D. (a & = b).

Question 10 : Suppose a and b are two real numbers. Which of the following expressions is not allowed under the syntax of the C programming language:

A. (ab).
B. (a- = b).
C. (a >> = b).
D. (a * = b).

Question 11 : Which of the following format is used to print an integer number 16:

A. '% d'.
B. '% x'.
C. '% i'.
D. '% u'.

Question 12 : Which of the following format is used to print an integer in system 8:

A. '% ld'.
B. '% x'.
C. '% o'.
D.% u '.

Question 13 : Which of the following formats is used to print a character:

A. '% f'.
B. '% x'.
C. '% s'.
D. '% c'.

Question 14 : Which of the following format is used to print a long integer:

A. '% ld'.
B. '% x'.
C. '% d'.
D. '% o'.

Answer:

1. D
2. B
3. B
4. C
5. B 6. A
7. D
8. A
9. D
10.C 11.B
12.C
13.D
14.A

See more:

  1. The function getc () in C
  2. Function strxfrm () in C
  3. Function fputs () in C
5 ★ | 1 Vote | 👨 145 Views
« PREV POST
NEXT POST »