Summer Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: s2p65

Easiest Solution 2 Pass Your Certification Exams

CLA-11-03 C++ Institute CLA - C Certified Associate Programmer Free Practice Exam Questions (2025 Updated)

Prepare effectively for your C++ Institute CLA-11-03 CLA - C Certified Associate Programmer certification with our extensive collection of free, high-quality practice questions. Each question is designed to mirror the actual exam format and objectives, complete with comprehensive answers and detailed explanations. Our materials are regularly updated for 2025, ensuring you have the most current resources to build confidence and succeed on your first attempt.

Page: 1 / 1
Total 40 questions

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

#include

#include

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

int a = 0, b = 1, c;

c = a++ && b++;

printf("%d",b);

return 0;

}

Choose the right answer:

A.

The program outputs 3

B.

The program outputs 1

C.

The program outputs 2

D.

Compilation fails

E.

The program outputs 0

What happens when you compile and run the following program?

#include

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:

A.

The program outputs 2

B.

The program outputs 4

C.

The program outputs 1

D.

The program outputs 0

E.

The program outputs 3

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:

A.

The program outputs 5

B.

Compilation fails

C.

The program outputs 3

D.

The program outputs 0

E.

The program outputs 4

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

#include

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

int i = 0;

printf ("%s", argv[i]);

return 0;

}

Choose the right answer:

A.

The program outputs an unpredictable string, or execution fails

B.

The program outputs a predictable non-empty string

C.

Execution fails

D.

The program outputs an empty string

E.

Compilation fails

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:

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

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:

A.

Execution fails

B.

The program outputs ["]

C.

The program outputs []

D.

The program outputs []

E.

Compilation fails

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

#include

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

int i = 1;

for( ;; i/=2)

if(i)

break ;

printf("%d",i);

return 0;

}

Choose the right answer:

The program executes an infinite loop

A.

The program outputs 1

B.

Compilation fails

C.

The program outputs 0

D.

The program outputs 0.5

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

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

#include

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:

A.

The program outputs 1

B.

The program outputs 5

C.

The program outputs 3

D.

Compilation fails

E.

The program outputs 4

-

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

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:

A.

The program outputs 3

B.

The program outputs 3.1415

C.

The program outputs 4

D.

Execution fails

E.

Compilation fails

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

Page: 1 / 1
Total 40 questions
Copyright © 2014-2025 Solution2Pass. All Rights Reserved