C++ Institute CLA - C Certified Associate Programmer CLA-11-03 Question # 9 Topic 1 Discussion

C++ Institute CLA - C Certified Associate Programmer CLA-11-03 Question # 9 Topic 1 Discussion

CLA-11-03 Exam Topic 1 Question 9 Discussion:
Question #: 9
Topic #: 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:


A.

The program outputs 4


B.

The program outputs 1


C.

The program outputs 5


D.

The program outputs 6


E.

Compilation fails


Get Premium CLA-11-03 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.