Cyber Monday 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
4 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
4 months ago
But what about option C) int main? It seems like a simpler solution.
upvoted 0 times
...
Keshia
4 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
4 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
3 months ago
C) int main
upvoted 0 times
...
Allene
3 months ago
C) int main
upvoted 0 times
...
Tawna
3 months ago
B) int main (int c, char *v[])
upvoted 0 times
...
Casie
4 months ago
A) int main (int argc, char *argv[])
upvoted 0 times
...
Raina
4 months ago
B) int main (int c, char *v[])
upvoted 0 times
...
Antonio
4 months ago
A) int main (int argc, char *argv[])
upvoted 0 times
...
...
Desire
4 months ago
I believe option B) int main (int c, char *v[]) is the correct choice.
upvoted 0 times
...
Lizette
5 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
3 months ago
C) int main
upvoted 0 times
...
Anglea
3 months ago
B) int main (int c, char *v[])
upvoted 0 times
...
Anglea
3 months ago
A) int main (int argc, char *argv[])
upvoted 0 times
...
Laurena
3 months ago
C) int main
upvoted 0 times
...
Rosio
3 months ago
B) int main (int c, char *v[])
upvoted 0 times
...
Ines
3 months ago
A) int main (int argc, char *argv[])
upvoted 0 times
...
...
Angelo
5 months ago
I think option A) int main (int argc, char *argv[]) will work.
upvoted 0 times
...
Alaine
5 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
4 months ago
C) int main
upvoted 0 times
...
Fletcher
4 months ago
B) int main (int c, char *v[])
upvoted 0 times
...
Fletcher
4 months ago
A) int main (int argc, char *argv[])
upvoted 0 times
...
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77