Ask your own question, for FREE!
Computer Science 12 Online
OpenStudy (anonymous):

Please help! Medal Awarded at End! Which of the following are allowed by the CS 161 class coding standards? For each statement not allowed by the class standards, explain what is wrong. (a) int myFunction(void); (b) int FunctionA(int); (c) int x(int); (d) int func(float &);

OpenStudy (anonymous):

Answer (a) is not correct. void cannot be passed as an argument in function.

OpenStudy (anonymous):

So all other ones are correct? Explain please...@rohnetrissa

OpenStudy (e.mccormick):

Is CS161 using C or C++ or? Because void is not only valid but proper as an argument in C. It works in C++ too, but is not the preferred method. So it is going to come down to what the question states as a requirement, the "CS 161 class coding standards" which are the standards made by that professor, as opposed to a standards body.

OpenStudy (e.mccormick):

Lets say the school is using C, then (void) would be required. However, what if their standard was for all user made functions to start with a lower case letter? Or, what if they use c/c++ and state that all function names must be descriptive? Both of those would give different answers.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!