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

CLA-11-03 Questions and Answers

Question # 6

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

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

printf ("%d", DELTA);

return 0;

Choose the right answer:

A.

The program outputs 2

B.

The program outputs -2

C.

The program outputs 1

D.

Compilation fails

E.

The program outputs -1

Full Access
Question # 7

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:

A.

The program outputs 4

B.

The program outputs 1

C.

The program outputs 5

D.

The program outputs 6

E.

Compilation fails

Full Access
Question # 8

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:

A.

The program outputs 9

B.

The program outputs 0

C.

Execution fails

D.

Compilation fails

E.

The program outputs 3

Full Access
Question # 9

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

#include

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

float f = 1e1 + 2e0 + 3e-1;

printf("%f ",f);

return 0;

}

Choose the right answer:

A.

The program outputs 1230.0000

B.

Compilation fails

C.

The program outputs 12300.000

D.

The program outputs 12.300000

E.

The program outputs 123.00000

Full Access
Question # 10

-

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

#include

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:

A.

The program outputs 1

B.

Compilation fails

C.

The program outputs 3

D.

The program outputs 2

E.

The program outputs 0

Full Access
Question # 11

What is the meaning of the following declaration?

float ** p;

Choose the right answer:

A.

p is a float pointer to a float

B.

The declaration is erroneous

C.

p is a pointer to a float pointer

D.

p is a pointer to a pointer to a float

E.

p is a pointer to a float

Full Access
Question # 12

What happens when you compile and run the following program?

#include

#define SYM

#define BOL 100

#undef SYM

int main (void) {

#ifdef SYM

int i = 100;

#else

int i= 200;

#endif

int j = i + 200;

printf("%d",i+j);

return 0;

}

Select the correct answer:

A.

The program outputs 200

B.

The program outputs 100

C.

The program outputs 400

D.

The program outputs 300

E.

The program outputs 600

Full Access