Consider the following C function

void swap ( int x, int y )

{

int tmp;

tmp = x;

x= y;

y = tmp;

}

In order to exchange the values of two variables a and b:

1
Call swap (a, b)
2
Call swap (&a, &b)
3
swap(a, b) cannot be used as it does not return any value
4
swap(a, b) cannot be used as the parameters passed by value

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation