BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

C++ Institute Exam CPA-21-02 Topic 1 Question 21 Discussion

Actual exam question for C++ Institute's CPA-21-02 exam
Question #: 21
Topic #: 1
[All CPA-21-02 Questions]

Which code lines inserted independently instead of the comment will make the following program work correctly? (Choose three.)

Show Suggested Answer Hide Answer
Suggested Answer: A, B

Contribute your Thoughts:

Viki
3 months ago
I think option A) int main (int argc, char *argv[]) is the best choice because it includes the arguments.
upvoted 0 times
...
Angelo
3 months ago
But what about option C) int main? It seems like a simpler solution.
upvoted 0 times
...
Keshia
3 months ago
A, B, and C? Pfft, that's too easy. I'm going for D - void main(), just to spice things up a little. Maybe I'll get lucky and the grader has a sense of humor!
upvoted 0 times
...
Gary
3 months ago
A, B, and C. Easy peasy, these are the three correct options. Although I'm partial to B, it's just more concise, you know?
upvoted 0 times
Audrie
2 months ago
C) int main
upvoted 0 times
...
Allene
2 months ago
C) int main
upvoted 0 times
...
Tawna
2 months ago
B) int main (int c, char *v[])
upvoted 0 times
...
Casie
3 months ago
A) int main (int argc, char *argv[])
upvoted 0 times
...
Raina
3 months ago
B) int main (int c, char *v[])
upvoted 0 times
...
Antonio
3 months ago
A) int main (int argc, char *argv[])
upvoted 0 times
...
...
Desire
3 months ago
I believe option B) int main (int c, char *v[]) is the correct choice.
upvoted 0 times
...
Lizette
4 months ago
Definitely A and B, they're both correct. But D? Nah, that's not how you declare a main function in C.
upvoted 0 times
Anglea
2 months ago
C) int main
upvoted 0 times
...
Anglea
2 months ago
B) int main (int c, char *v[])
upvoted 0 times
...
Anglea
2 months ago
A) int main (int argc, char *argv[])
upvoted 0 times
...
Laurena
2 months ago
C) int main
upvoted 0 times
...
Rosio
2 months ago
B) int main (int c, char *v[])
upvoted 0 times
...
Ines
2 months ago
A) int main (int argc, char *argv[])
upvoted 0 times
...
...
Angelo
4 months ago
I think option A) int main (int argc, char *argv[]) will work.
upvoted 0 times
...
Alaine
4 months ago
A, B, and C are all valid main function declarations. But I'd go with A, it's the most common and standard one.
upvoted 0 times
Fletcher
3 months ago
C) int main
upvoted 0 times
...
Fletcher
3 months ago
B) int main (int c, char *v[])
upvoted 0 times
...
Fletcher
3 months ago
A) int main (int argc, char *argv[])
upvoted 0 times
...
...

Save Cancel