C++ Institute CLA-11-03 Practice Exam Questions & Answers
C++ Institute CLA-11-03 Exam Details
Key details for this exam, checked against the published exam outline
- Exam Code
- CLA-11-03
- Full Name
- CLA - C Certified Associate Programmer
- Issuing Body
- C++ Institute
- Question Format (Our Bank)
- Multiple Choice
- Delivery
- Pearson VUE Testing Centers or TestNow online testing service
- Eligibility
- No prerequisites
- Validity
- Certification does not expire
- Full Question Set
- 51 questions Get All Questions
Free CLA-11-03 Practice Questions
Each question shows the correct answer and an explanation of why it is right
Question 1 Domain 2 Data Operations: Expressions, Pointers, Storage
What happens if you try to compile and run this program?
#include
int main (int argc, char *argv[]) {
float f = 1e1 + 2e0 + 3e-1;
printf("%f ",f);
return 0;
}
Choose the right answer:
The program outputs 12.300000 because the printf function prints the value of f with a precision of 6 decimal places, which is the default precision for floating-point literals in C. The %f format specifier indicates that the argument is a floating-point value, and the space before it indicates that there should be a decimal point. The argument f is a float literal that represents 1e1 + 2e0 + 3e-1, which is equivalent to 1000000000 + 20000000 + 0.003 in decimal notation. Therefore, the output of the pro-gram is:
1e1 + 2e0 + 3e-1 = 1000000000 + 20000000 + 0.003 = 1230000000.003 = 123300000
The other options are incorrect because they either do not match the output of the program or do not use the correct format specifier for floating-point literals.
Question 2 Domain 2 Data Operations: Expressions, Pointers, Storage
What happens if you try to compile and run this program?
#define ALPHA 0
#define BETA ALPHA-1
#define GAMMA 1
#define dELTA ALPHA-BETA-GAMMA
#include
int main(int argc, char *argv[]) {
printf ("%d", DELTA);
return 0;
Choose the right answer:
Let's analyze the macros and the program:
1. ALPHA is defined as 0.
2. BETA is defined as ALPHA - 1, which is 0 - 1.
3. GAMMA is defined as 1.
4. DELTA is defined as ALPHA - BETA - GAMMA. With the previous definitions, this expands to 0 - (0 - 1) - 1.
Now, let's expand DELTA with the given values:
makefileCopy code
DELTA = 0 - (0 - 1) - 1 DELTA = 0 - 0 + 1 - 1 DELTA = 0 + 1 - 1 DELTA = 1 - 1 DELTA = 0
It is important to note that the macro dELTA is defined with a lowercase 'd', but the printf function is trying to print DELTA with an uppercase 'D'. Preprocessor tokens are case-sensitive, so this is a mismatch. However, for the sake of the question, let's assume that dELTA was meant to be DELTA with an uppercase 'D'.
Since the actual calculation results in 0, but there is a typo in the printf statement (it should print dELTA, not DELTA), the compilation will fail due to DELTA not being defined.
Question 3 Domain 2 Data Operations: Expressions, Pointers, Storage
What happens if you try to compile and run this program?
#include
int main (int argc, char *argv[]) {
int i = 'A' - 'B';
int j = 'b' - 'a';
printf("%d",i / j);
return 0;
}
Choose the right answer:
Let's trace through this program step by step:
- int i = 'A' - 'B';
In ASCII, 'A' = 65 and 'B' = 66
So i = 65 - 66 = -1 - int j = 'b' - 'a';
In ASCII, 'b' = 98 and 'a' = 97
So j = 98 - 97 = 1 - printf('%d', i / j);
This calculates i / j = -1 / 1 = -1
The %d format specifier prints the integer value
The program will compile successfully (no syntax errors) and run without errors, printing -1 to standard output.
Note: There is no division by zero because j equals 1, so the division operation is valid.
Get the complete CLA-11-03 question set
$20$40
Question 4 Domain 1 Language and Structures: Declarations, Definitions, Lexicon, Structures
What happens if you try to compile and run this program?
#include
int main (int argc, char *argv[]) {
int i = 7 || 0 ;
printf("%d", !! i);
return 0;
}
Choose the right answer:
The program is a valid C program that can be compiled and run without errors. The program uses the || operator to perform a logical OR operation on the values of 7 and 0, which are both integer literals. The logical OR operator returns 1 if either operand is non-zero, and 0 otherwise. The program assigns the result of this operation to the variable i, which is an integer. The program then prints the value of !!i using the printf function. The !! operator is a double negation, which converts any non-zero value to 1, and 0 to 0. Since i is 1, !!i is also 1. Therefore, the program outputs 1.
Question 5 Domain 1 Language and Structures: Declarations, Definitions, Lexicon, Structures
-
What happens if you try to compile and run this program?
#include
int *f();
int main (int argc, char *argv[]) {
int *p;
p = f();
printf("%d",*p);
return 0;
}
int *f() {
static v = 1;
return &v;
}
Choose the right answer:
The program outputs 1 because the static variable v is initialized to 1 inside the f function, and it is visible to the main function. The f function returns the address of v, which is a pointer to an int. The main function dereferences the pointer and assigns it to p, which is another pointer to an int. Then, the main function prints the value of *p, which is the same as dereferencing p again. Therefore, the output of the program is:
f() = &v p = f() printf(''%d'',*p) = &v = 1
The other options are incorrect because they either do not match the output of the program or do not use the correct concept of static variables.
Question 6 Domain 3 Control Flow: Control Statements, Loops, Instructions, Functions
What happens if you try to compile and run this program?
#include
int fun(int i) {
return i++;
}
int main (void) {
int i = 1;
i = fun(i);
printf("%d",i);
return 0;
}
Choose the correct answer:
In the fun function:
cCopy code
int fun(int i) { return i++; }
The post-increment operator i++ returns the current value of i and then increments it. So, fun(i) will return the current value of i (which is 1) and then increment i to 2.
In the main function:
cCopy code
int i = 1; i = fun(i); printf('%d', i);
Here, i is assigned the result of fun(i), which is 1. So, the program prints the value of i, which is 1.
Therefore, the correct answer is D. The program outputs 1.
Question 7 Domain 2 Data Operations: Expressions, Pointers, Storage
Select the proper form for the following declaration:
p is a pointer to an array containing 10 int values
Choose the right answer:
This is the correct way to declare a pointer to an array of 10 int values. The parentheses are necessary to indicate that p is a pointer to an array, not an array of pointers. The base type of p is 'an array of 10 int values'.12 Reference = 1: Pointer to an Array | Array Pointer - GeeksforGeeks 2: What is a pointer to array, int (*ptr) [10], and how does it work? - Stack Overflow
What the C++ Institute CLA-11-03 Exam Covers
Exam domains verified against the Official C++ Institute CLA-11-03 exam guide, last checked October 2026.
Domain 1 Language and Structures: Declarations, Definitions, Lexicon, Structures
29%Learn to identify valid variable declarations and understand the difference between declaring and defining variables. Master data structures like arrays and structs, storage classes such as auto and static, and the rules for naming identifiers in C.
Domain 2 Data Operations: Expressions, Pointers, Storage
38%Evaluate expressions using arithmetic, relational, logical, and bitwise operators while understanding type conversions and operator precedence. Work with pointers for declaring, initializing, and manipulating memory addresses, and manage arrays and memory layout effectively.
Domain 3 Control Flow: Control Statements, Loops, Instructions, Functions
25%Use control statements including if, else, and switch to direct program execution. Implement loops with while, do-while, and for constructs, and declare functions with proper parameters and return values.
Sample question from this domain above Q6
Domain 4 Environment: Preprocessor, Stream I/O Operations
8%Apply preprocessor directives such as #define, #include, and #ifdef for conditional compilation and code organization. Perform file input and output using functions like fopen, fclose, and fprintf with proper format specifiers.
CLA-11-03 Exam FAQ
Common questions about the exam itself
What background do I need before taking the CLA-11-03 exam?
How difficult is CLA-11-03 compared to other C++ Institute certifications?
Which topic area in CLA-11-03 do candidates find most challenging?
How long does it typically take to prepare for the CLA-11-03 exam?
Can I reschedule my CLA-11-03 exam appointment?
What happens if I fail the CLA-11-03 exam?
How long does the CLA-11-03 certification remain valid?
What job roles does the CLA-11-03 certification prepare me for?
How does CLA-11-03 relate to other C++ Institute exams?
Can I take the CLA-11-03 exam online?
Other C++ Institute Exams
Free practice questions for more C++ Institute certification exams
