Easter Sale Special 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exams65

CLA - C Certified Associate Programmer Question and Answers

CLA - C Certified Associate Programmer

Last Update May 20, 2024
Total Questions : 40

We are offering FREE CLA-11-03 C++ Institute exam questions. All you do is to just go and sign up. Give your details, prepare CLA-11-03 free exam questions and then go for complete pool of CLA - C Certified Associate Programmer test questions that will help you more.

CLA-11-03 pdf

CLA-11-03 PDF

$35  $99.99
CLA-11-03 Engine

CLA-11-03 Testing Engine

$42  $119.99
CLA-11-03 PDF + Engine

CLA-11-03 PDF + Testing Engine

$56  $159.99
Questions 1

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

#include

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

int i = 2;

int d= i << 2;

d /= 2;

printf ("%d", d) ;

return 0;

}

Choose the right answer:

Options:

A.  

The program outputs 0

B.  

The program outputs 4

C.  

The program outputs 1

D.  

The program outputs 2

E.  

Compilation fails

Discussion 0
Questions 2

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

Discussion 0
Questions 3

What is the meaning of the following declaration?

float ** p;

Choose the right answer:

Options:

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

Discussion 0
Questions 4

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

Discussion 0
Questions 5

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

#include

int *fun(int *t) {

return t + 4;

}

int main (void) {

int arr[] = { 4, 3, 2, 1, 0 };

int *ptr;

ptr = fun (arr - 3);

printf("%d \n", ptr[2]);

return 0;

}

Choose the right answer:

Options:

A.  

The program outputs 2

B.  

The program outputs 4

C.  

The program outputs 5

D.  

The program outputs 1

E.  

The program outputs 3

Discussion 0
Questions 6

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

Discussion 0
Questions 7

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:

Options:

A.  

The program outputs 1

B.  

The program outputs 5

C.  

The program outputs 3

D.  

Compilation fails

E.  

The program outputs 4

Discussion 0
Questions 8

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

#include

fun (void) {

static int n = 3;

return --n;

}

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

printf("%d \n", fun() + fun());

return 0;

}

Select the correct answer:

Options:

A.  

The program outputs 3

B.  

The program outputs 0

C.  

The program outputs 1

D.  

The program outputs 2

E.  

The program outputs 4

Discussion 0
Questions 9

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

Options:

A.  

The program outputs 1

B.  

Compilation fails

C.  

The program outputs 0

D.  

The program outputs 0.5

Discussion 0
Questions 10

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

Discussion 0
Questions 11

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:

Options:

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

Discussion 0
Questions 12

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:

Options:

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

Discussion 0