CLA-11-03 CLA - C Certified Associate Programmer Questions and Answers
What happens if you try to compile and run this program?
#include < stdio.h >
int main (int argc, char *argv[]) {
char i = 20 + 020 + 0x20;
printf("%d",i);
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#include < stdio.h >
int *fun(int *t) {
return t + 4;
}
int main (void) {
int arr[] = { 4, 3, 2, 1, 0 };
int *ptr;
ptr = fun (arr - 3);
printf("%d \n", ptr[2]);
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#include < stdio.h >
int main (int argc, char *argv[]) {
float f = 1e1 + 2e0 + 3e-1;
printf("%f ",f);
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#include < stdio.h >
int main (int argc, char *argv[]) {
int i = 0;
printf ("%s", argv[i]);
return 0;
}
Choose the right answer:
What is the meaning of the following declaration?
float ** p;
Choose the right answer:
What happens if you try to compile and run this program?
#include < stdio.h >
int fun(int i) {
return i++;
}
int main (void) {
int i = 1;
i = fun(i);
printf("%d",i);
return 0;
}
Choose the correct answer:
What happens if you try to compile and run this program?
#include < stdio.h >
int main (int argc, char *argv[]) {
int main, Main, mAIN = 1;
Main = main = mAIN += 1;
printf ("%d", MaIn) ;
return 0;
}
Choose the right answer:
Assume that ints are 32-bit wide.
What happens if you try to compile and run this program?
#include < stdio.h >
typedef struct
int i;
int j;
int k;
} str;
int main (int argc, char *argv[]) {
str s = { 7, 7, 7 };
printf ("%d", sizeof (s.s));
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#include < stdio.h >
int main (int argc, char *argv[]) {
int i = 1, j = 0;
int 1 = !i + !! j;
printf("%d", 1);
return 0;
}
Choose the right answer:
