C++ Institute CLA-11-03 CLA – C Certified Associate Programmer Online Training
C++ Institute CLA-11-03 Online Training
The questions for CLA-11-03 were last updated at Jul 07,2025.
- Exam Code: CLA-11-03
- Exam Name: CLA - C Certified Associate Programmer
- Certification Provider: C++ Institute
- Latest update: Jul 07,2025
Exams Prep
What happens if you try to compile and run this program?
#include <stdio.h>
int main (int argc, char *argv[]) {
int i = ‘A’ – ‘B’;
int j = ‘b’ – ‘a’;
printf("%d",i / j);
return 0;
}
Choose the right answer:
- A . Execution fails
- B . Compilation fails
- C . The program outputs 1
- D . The program outputs -1
- E . The program outputs 0
What happens if you try to compile and run this program?
#include <stdio.h>
int main (int argc, char *argv[]) {
char *t = "abcdefgh";
char *p = t + 2;
int i;
p++;
p++;
printf("%d ", p[2] – p[-1]);
C++ Institute – CLA-11-03
return 0;
}
Choose the right answer:
- A . The program outputs 3
- B . The program outputs 4
- C . Execution fails
- D . The program outputs 2
- E . Compilation fails
What happens if you try to compile and run this program?
#include <stdio.h>
int main(int argc, char *argv[]) {
int i = 10 – 2 / 5 * 10 / 2 – 1;
printf("%d",i);
return 0;
}
Choose the right answer:
- A . The program outputs 0
- B . The program outputs 4
- C . Compilation fails
- D . The program outputs 9
- E . The program outputs 15
What happens if you try to compile and run this program?
#include <stdio.h>
int main(int argc, char *argv[]) {
int i = 10 – 2 / 5 * 10 / 2 – 1;
printf("%d",i);
return 0;
}
Choose the right answer:
- A . The program outputs 0
- B . The program outputs 4
- C . Compilation fails
- D . The program outputs 9
- E . The program outputs 15
What happens if you try to compile and run this program?
#include <stdio.h>
int main(int argc, char *argv[]) {
int i = 10 – 2 / 5 * 10 / 2 – 1;
printf("%d",i);
return 0;
}
Choose the right answer:
- A . The program outputs 0
- B . The program outputs 4
- C . Compilation fails
- D . The program outputs 9
- E . The program outputs 15
What happens if you try to compile and run this program?
#include <stdio.h>
int main(int argc, char *argv[]) {
int i = 10 – 2 / 5 * 10 / 2 – 1;
printf("%d",i);
return 0;
}
Choose the right answer:
- A . The program outputs 0
- B . The program outputs 4
- C . Compilation fails
- D . The program outputs 9
- E . The program outputs 15
What happens if you try to compile and run this program?
#include <stdio.h>
int main(int argc, char *argv[]) {
int i = 10 – 2 / 5 * 10 / 2 – 1;
printf("%d",i);
return 0;
}
Choose the right answer:
- A . The program outputs 0
- B . The program outputs 4
- C . Compilation fails
- D . The program outputs 9
- E . The program outputs 15
Assume that ints are 32-bit wide.
What happens if you try to compile and run this program?
#include <stdio.h>
typedef union {
int i;
int j;
int k;
} uni;
int main (int argc, char *argv[]) {
uni s;
s.i = 3;
s.j = 2;
s.k = 1;
printf("%d",s.k * (s.i – s.j));
return 0;
}
Choose the right answer:
- A . The program outputs 9
- B . The program outputs 0
- C . Execution fails
- D . Compilation fails
- E . The program outputs 3
What happens if you try to compile and run this program?
enum { A, B, C, D, E, F };
#include <stdio.h>
int main (int argc, char *argv[]) {
printf ("%d", B + D + F);
return 0;
}
Choose the right answer:
- A . The program outputs 10
- B . The program outputs 7
- C . The program outputs 8
- D . Compilation fails
- E . The progham outputs 9