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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!