Free CLE – C Certified Entry-Level Programmer Practice Questions
100 free questions · Answer explanations · No signup required
View examination details, outline and sourcesLoading selected examination banks…
Sample Practice Questions
Try these 10 sample questions from the CLE – C Certified Entry-Level Programmer practice bank. Each includes the answer and explanation. Continue with the interactive practice above to review the full question set.
1During a conventional GCC build of a C program, which sequence describes the stages in their execution order?
- A. Compilation, preprocessing, assembly, linking
- B. Preprocessing, compilation, assembly, linking
- C. Preprocessing, assembly, linking, compilation
- D. Assembly, preprocessing, compilation, linking
Answer: B
Explanation: The source states: "Compilation can involve up to four stages: preprocessing, compilation proper, assembly and linking, always in that order.". Preprocessing handles directives before compilation proper; assembly and linking follow. The other sequences move a stage ahead of its required predecessor.
Reference: Using the GNU Compiler Collection: Options Controlling the Kind of Output — §3.2, opening paragraph
2Which declaration gives p a derived pointer type rather than a basic arithmetic type?
- A. double p;
- B. char p;
- C. int *p;
- D. unsigned int p;
Answer: C
Explanation: The source states: "A pointer type may be derived from a function type or an object type, called the referenced type.". The * declarator makes p a pointer to int. double, char, and unsigned int are basic arithmetic types, even when an integer type uses a modifier.
Reference: Programming languages — C, WG14 N1570 Committee Draft — §6.2.5 paragraphs 14 and 20
3When addition and multiplication occur together without grouping parentheses, which result does C produce for 2 + 3 * 4?
- A. 20
- B. 24
- C. 14
- D. 9
Answer: C
Explanation: The source states: "The grouping of operators and operands is indicated by the syntax.". Multiplication has higher precedence than addition, so 3 * 4 gives 12 and then 2 + 12 gives 14. Evaluating addition first gives the distractor 20.
Reference: Programming languages — C, WG14 N1570 Committee Draft — §6.5 paragraph 3 and footnote 85; §§6.5.5–6.5.6
4A conditional uses a negative nonzero controlling value. Which value reaches x? int x = 0; if (-3) x = 7; else x = 9;
- A. 0
- B. -3
- C. 9
- D. 7
Answer: D
Explanation: The source states: "the first substatement is executed if the expression compares unequal to 0.". A negative nonzero controlling value is true in C. The first branch assigns 7; truth does not require a positive value or exactly 1.
Reference: Programming languages — C, WG14 N1570 Committee Draft — §6.8.4.1 paragraph 2
5For a while statement whose initial controlling expression is false, how many body executions occur? int n = 0; while (n > 0) { --n; }
- A. 0
- B. 1
- C. 2
- D. It repeats indefinitely
Answer: A
Explanation: The source states: "The evaluation of the controlling expression takes place before each execution of the loop body.". The initial test 0 > 0 is false, so the while body is never entered. A while loop does not guarantee a first iteration.
Reference: Programming languages — C, WG14 N1570 Committee Draft — Printed p.151, The while statement
6Which value replaces the second array element when this indexed assignment finishes? int a[3] = {4, 7, 9}; a[1] = a[0] + a[2];
- A. 7
- B. 11
- C. 13
- D. 16
Answer: C
Explanation: The source states: "E1[E2] designates the E2-th element of E1 (counting from zero).". The assignment replaces the second element with 4 + 9, which is 13. It does not change the first or last element.
Reference: Programming languages — C, WG14 N1570 Committee Draft — §6.5.2.1 paragraph 2; §6.5.16.1 paragraph 2
7What is the maximum numeric code value in standard 7-bit ASCII?
- A. 127
- B. 128
- C. 255
- D. 256
Answer: A
Explanation: The source states: "The standard 7-bit character representation, with b7 the high-order bit and b1 the low-order bit, is shown below:". Seven binary positions represent 2 to the seventh power values, numbered from 0 through 127. The other values confuse the count with the maximum or assume eight code bits.
Reference: RFC 20: ASCII format for Network Interchange — §3, Character Representation and Code Identification
8Which declaration is a prototype for a C function named sum that takes two int parameters and returns int?
- A. int sum(int);
- B. void sum(int, int);
- C. int sum(int, int);
- D. int sum(void);
Answer: C
Explanation: The source states: "A parameter type list specifies the types of, and may declare identifiers for, the parameters of the function.". The leading int specifies the return type and the two listed int types specify the parameters. The other prototypes have a different parameter count or return type.
Reference: Programming languages — C, WG14 N1570 Committee Draft — §6.7.6.3 paragraphs 5–6
9A C project has already produced several object files. Which build stage combines them into an executable?
- A. Preprocessing
- B. Compilation proper
- C. Assembly
- D. Linking
Answer: D
Explanation: The source states: "linking combines all the object files (those newly compiled, and those specified as input) into an executable file.". Linking combines the object files. Preprocessing handles source directives, compilation proper produces assembly, and assembly produces object files.
Reference: Using the GNU Compiler Collection: Options Controlling the Kind of Output — §3.2, opening paragraph
10Which keyword changes int to the corresponding integer type that represents nonnegative values without a sign?
- A. long
- B. const
- C. short
- D. unsigned
Answer: D
Explanation: The source states: "For each of the signed integer types, there is a corresponding (but different) unsigned integer type (designated with the keyword unsigned)". unsigned selects the unsigned counterpart. long and short select integer ranks rather than unsignedness; const qualifies an object against modification.
Reference: Programming languages — C, WG14 N1570 Committee Draft — §6.2.5 paragraph 6
Topics in this practice bank
These topics describe the available practice for CLE – C Certified Entry-Level Programmer. Review the examination outline and its sources for scope and allocation details.
Basic Concepts
- Compilation, compiler and IDE
- Language elements, lexis, syntax, semantics and portability
- Literals
- Output, main() and return
- Numeral systems
- Arithmetic operators and variable declarations
Data Types, Evaluations, and Basic I/O Operations
- Primary and derived types and type modifiers
- Casting and conversions
- Variables, assignments and constants
- Input/output and format specifiers
- Header files and basic calculations
Arithmetic, Logical, and Bitwise Operators
- Unary and binary operators, precedence and associativity
- Calculations and rounding
- Increment, decrement and compound assignment
- Bitwise shifts and logical operators
- Truth tables
Flow Control: Decision-Making Statements
- Conditional statements
- Multiple and nested conditions
- Switch, case and default
- Control instructions
Flow Control: Loops
- While, for and do...while
- Sequence iteration and infinite loops
- Loop structure, nesting and execution
- Break and continue
Arrays, Pointers, and Memory Management
- Single- and multidimensional arrays
- Initiators and array sorting
- Pointers, NULL, arithmetic and references
- Pointers versus arrays
- Memory allocation and deallocation
String Manipulation
- Character arrays and ASCII codes
- String initialization and processing
- String functions
- String header files
The Basics of Functions
- Function definitions, declarations and calls
- Parameters and return values
- Selected C standard library functions
How to use these free practice questions
Choose an answer, check the explanation, and review your progress by chapter. Practice questions and explanations are free to access without signing up.
These are independent study questions, not actual examination items. For examination requirements and official information, view CLE – C Certified Entry-Level Programmer details.