Weekend Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = simple70

Pass the C++ Institute Certification CLA-11-03 Questions and answers with ExamsMirror

Practice at least 50% of the questions to maximize your chances of passing.
Exam CLA-11-03 Premium Access

View all detail and faqs for the CLA-11-03 exam


473 Students Passed

95% Average Score

91% Same Questions
Viewing page 1 out of 2 pages
Viewing questions 1-10 out of questions
Questions # 1:

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

#include

#include

struct STR {

int i;

char c[20];

float f;

};

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

struct STR str = { 1, "Hello", 3 };

printf("%d", str.i + strlen(str.c));

return 0;

}

Choose the right answer:

Options:

A.

The program outputs 4

B.

The program outputs 1

C.

The program outputs 5

D.

The program outputs 6

E.

Compilation fails

Questions # 2:

Select the proper form for the following declaration:

p is a pointer to an array containing 10 int values

Choose the right answer:

Options:

A.

int * (p) [10];

B.

int (*p) [10];

C.

The declaration is invalid and cannot be coded in C

D.

int (*)p[10];

E.

int *p[10];

Questions # 3:

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

#include

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

int i = 1, j = 0;

int 1 = !i + !! j;

printf("%d", 1);

return 0;

}

Choose the right answer:

Options:

A.

Compilation fails

B.

The program outputs 2

C.

The program outputs 3

D.

The program outputs 1

E.

The program outputs 0

Questions # 4:

What happens when you compile and run the following program?

#include

int fun(void) {

static int i = 1;

i++;

return i;

}

int main (void) {

int k, l;

k = fun ();

l = fun () ;

printf("%d",l + k);

return 0;

}

Choose the right answer:

Options:

A.

The program outputs 5

B.

The program outputs 2

C.

The program outputs 1

D.

The program outputs 4

E.

The program outputs 3

Questions # 5:

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

#include

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

char *p = "John" " " "Bean";

printf("[%s]", p) ;

return 0;

}

Choose the right answer:

Options:

A.

The program outputs "[]"

B.

The program outputs nothing

C.

The program outputs [John Bean]

D.

The program outputs three lines of text

E.

The program outputs two lines of text

Questions # 6:

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

#include

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

char i = 20 + 020 + 0x20;

printf("%d",i);

return 0;

}

Choose the right answer:

Options:

A.

The program outputs 68

B.

The program outputs 60

C.

Compilation fails

D.

The program outputs 86

E.

The program outputs 62

Questions # 7:

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

Questions # 8:

Assume that ints and floats are 32-bit wide.

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

#include

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:

Options:

A.

The program outputs 16

B.

The program outputs 8

C.

Compilation fails

D.

The program outputs 4

E.

The program outputs 24

Questions # 9:

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

#include

#include

void fun (void) {

return 3.1415;

}

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

int i = fun(3.1415);

printf("%d",i);

return 0;

}

Choose the right answer:

Options:

A.

The program outputs 3

B.

The program outputs 3.1415

C.

The program outputs 4

D.

Execution fails

E.

Compilation fails

Questions # 10:

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:

Options:

A.

The program outputs 2

B.

Compilation fails

C.

The program outputs 0

D.

The program outputs 1

E.

The program outputs an unpredictable value

Viewing page 1 out of 2 pages
Viewing questions 1-10 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.