Winter Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bigdisc65

Last Attempt CLA-11-03 Questions

Page: 2 / 2
Question 8

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

Question 9

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

#include

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

char *s = "\\\"\\\\";

printf ("[%c]", s [1]);

return 0;

}

Choose the right answer:

Options:

A.

Execution fails

B.

The program outputs ["]

C.

The program outputs []

D.

The program outputs []

E.

Compilation fails

Question 10

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

#include

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

int main, Main, mAIN = 1;

Main = main = mAIN += 1;

printf ("%d", MaIn) ;

return 0;

}

Choose the right answer:

Options:

A.

The program outputs 1

B.

The program outputs 3

C.

Compilation fails

D.

The program outputs 2

E.

The program outputs an unpredictable value

Question 11

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

Page: 2 / 2
Last Attempt CLA-11-03 Questions,
Exam Code: CLA-11-03
Exam Name: CLA - C Certified Associate Programmer
Last Update: Nov 21, 2024
Questions: 40
CLA-11-03 pdf

CLA-11-03 PDF

$28  $80
CLA-11-03 Engine

CLA-11-03 Testing Engine

$33.25  $95
CLA-11-03 PDF + Engine

CLA-11-03 PDF + Testing Engine

$45.5  $130