Question
Multiple Choice Question 1 part a) If a function has a prototype of int myFunction(int y, int x); For the program instructions: int x=13; int
Multiple Choice Question 1
part a) If a function has a prototype of "int myFunction(int y, int x);
For the program instructions:
int x=13;
int y =2;
myFunction(y,x);
What is passed to myFunction?
*y is 2, x is 13
*x is 2, y is 13
*nothing, it is a compilation error
*26
part b) For the programming instructions:
int x = 3, y = 2;
int xyz(int num1,int num2);
int main( void ) {
printf("%d",xyz(x,y));
return 0;
}
int xyz(int num1, int num2) {
return (num1*num2);
}
What is the output?
*6
*9
*3
*2
part c)For the programming instructions:
int x = 3, y = 2;
int xyz(int num1,int num2);
int main( void ) {
for(x=1;x<2;x++){
if (x=2)
x++;
}
printf("%d",xyz(x,y));
return 0;
}
int xyz(int num1, int num2) {
return (num1*num2);
}
What is the output?
*8
*6
*4
*2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started