Which is the function prototype for a function called PrintData that receives on
ID: 3812245 • Letter: W
Question
Which is the function prototype for a function called PrintData that receives one float and returns no data? A. float void PrintData (void) B. float ProntData() C. void Print Data(float data) D. float return PrintData (void) What is the purpose of the function prototype? A. Declares variables that need to be used. B. Provides the compiler with function information. C. Allows the function to be called. D. You don't always need a prototype What is the purpose of the function call? A. Control is passed to the called function. B. The program is passed all of the called function's variables. C. main () gets to use the function's variables D. Both A & C. Why doesn't the main function need a prototype statement? A. It does have one, we just don't see it. B. It gets called by value C. Because it has a return type D. The operating system knows to look for it. After a function executes, to where does control of the program return? A. To main () B. To the called function. C. To the last line where it left off. D. To the call statement.Explanation / Answer
20:
ANS :D
These are valid prgramming statements so Option D is correct if function name is valid .Function name is not visible in image
21:
ANS :C
PrintData take float as data and return void i.e nothing
22:
ANS: B
Function prototype helps compiler to understand function argument and its return type
Eg.
Void fun(int );
//this is function prototype for function fun which took int variable as argument and return nothing
23:
ANS:A
Control is passed to called function
Eg:
Void f1()
{
f2();
}
Void f2()
{
}
So control is passed from f1 to f2 and will return to f1 once f2 completes its execution
24:
ANS:A
Prototype for main is actually following
Int main(int argc, char* argv);
25:D
It return to caller function.
Eg
Void f1()
{
F2();
Printf();
}
When f2 is done with execution it will return to f1 and the execute printf();
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.