Black Friday Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: Board70

CLA-11-03 Exam Dumps - C++ Institute Certification Questions and Answers

Page: 1 / 2
Questions 4

What happens if you try to compile and run this program?

#include

int main(int argc, char *argv[]) {

int i = 2 / 1 + 4 / 2;

printf("%d",i);

return 0;

}

Choose the right answer:

Options:

A.

The program outputs 5

B.

Compilation fails

C.

The program outputs 3

D.

The program outputs 0

E.

The program outputs 4

Buy Now
Questions 5

Assume that ints are 32-bit wide.

What happens if you try to compile and run this program?

#include

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:

Options:

A.

The program outputs 9

B.

The program outputs 0

C.

Execution fails

D.

Compilation fails

E.

The program outputs 3

Buy Now
Questions 6

What happens if you try to compile and run this program?

#include

int main (int argc, char *argv[]) {

int i = 1;

for(;i > 128;i *= 2);

printf("%d", i) ;

return 0;

}

-

Choose the right answer:

Options:

A.

The program enters an infinite loop

B.

Compilation fails

C.

The program outputs a value less than 128

D.

The program outputs 128

E.

The program outputs a value greater than 128

Buy Now
Questions 7

What happens if you try to compile and run this program?

#include

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:

Options:

A.

The program outputs 3

B.

The program outputs 4

C.

Execution fails

D.

The program outputs 2

E.

Compilation fails

Buy Now
Page: 1 / 2
Exam Code: CLA-11-03
Exam Name: CLA - C Certified Associate Programmer
Last Update: Nov 24, 2024
Questions: 40
CLA-11-03 pdf

CLA-11-03 PDF

$25.5  $84.99
CLA-11-03 Engine

CLA-11-03 Testing Engine

$28.5  $94.99
CLA-11-03 PDF + Engine

CLA-11-03 PDF + Testing Engine

$40.5  $134.99