Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

Prepare an ID card of the continent Antarctica?

Answered: 1 week ago

Question

What do you understand by Mendeleev's periodic table

Answered: 1 week ago