4.3/5 - (3 votes)

Get Jun-2024 updated CLA-11-03 Certification Exam Sample Questions

CLA-11-03 Study Guide Cover to Cover as Literally

Q10. What happens if you try to compile and run this program?
#include <stdio.h>
int main (int argc, char *argv[]) {
int i =2, j = 1;
if(i / j)
j += j;
else
i += i;
printf(“%d”,i + j);
return 0;
}
Choose the right answer:

 
 
 
 
 

Q11. –
What happens if you try to compile and run this program?
#include <stdio.h>
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:

 
 
 
 
 

Q12. What happens if you try to compile and run this program?
#include <stdio.h>
int main (int argc, char *argv[]) {
char *p = “John” ” ” “Bean”;
printf(“[%s]”, p) ;
return 0;
}
Choose the right answer:

 
 
 
 
 

Q13. What happens if you try to compile and run this program?
#include <stdio.h>
int i = 0;
int main (int argc, char *argv[]) {
for(i; 1; i++);
printf(“%d”, i);
return 0;
}
Choose the right answer:

 
 
 
 
 

Q14. What happens if you try to compile and run this program?
#include <stdio.h>
int main (int argc, char *argv[]) {
char *p = “World”;
int i = 2;
switch (p[i]) {
case ‘W’ :i++; break ;
case ‘o’ :i += 2; break ;
case ‘r’ :i += 3; break ;
case ‘1’ :i += 4; break ;
case ‘d’ :i += 5; break ;
default :i += 4;
}
printf(“%d”, i);
return 0;
}
–
Choose the right answer:

 
 
 
 
 

Q15. 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:

 
 
 
 
 

Q16. What happens if you try to compile and run this program?
#include <stdio.h>
fun (void) {
static int n = 3;
return –n;
}
int main (int argc, char ** argv) {
printf(“%d n”, fun() + fun());
return 0;
}
Select the correct answer:

 
 
 
 
 

Q17. Select the proper form for the following declaration:
p is a pointer to an array containing 10 int values
Choose the right answer:

 
 
 
 
 

Q18. 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]);
return 0;
}
Choose the right answer:

 
 
 
 
 

Q19. What happens if you try to compile and run this program?
#include <stdio.h>
int main (int argc, char *argv[]) {
char *p = “John” ” ” “Bean”;
printf(“[%s]”, p) ;
return 0;
}
Choose the right answer:

 
 
 
 
 

Q20. 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 <stdio.h>
int main(int argc, char *argv[]) {
printf (“%d”, DELTA);
return 0;
Choose the right answer:

 
 
 
 
 

Q21. What happens when you compile and run the following program?
#include <stdio.h>
int fun (void) {
static int i = 1;
i += 2;
return i;
}
int main (void) {
int k, 1;
k = fun ();
1 = fun () ;
printf (“%d”, 1 – k);
return 0;
}
Choose the right answer:

 
 
 
 
 

Q22. 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:

 
 
 
 
 

Q23. Assume that ints and floats are 32-bit wide.
What happens if you try to compile and run this program?
#include <stdio.h>
union uni {
float f, g;
int i, j;
};
int main (int argc, char *argv[]) {
union uni u;
printf (“%ld”, sizeof (u) ) ;
return 0;
}
Choose the right answer:

 
 
 
 
 

Q24. 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:

 
 
 
 
 

100% Real & Accurate CLA-11-03 Questions and Answers with Free and Fast Updates: https://www.testkingit.com/c-plus-plus-institute/latest-CLA-11-03-exam-dumps.html

Related Links: www.stes.tyc.edu.tw www.stes.tyc.edu.tw www.stes.tyc.edu.tw www.stes.tyc.edu.tw www.stes.tyc.edu.tw www.stes.tyc.edu.tw