6)swap(int x,y)
{
int temp;
temp=x;
x=y;
y=temp;
}
main()
{
int x=2;y=3;
swap(x,y);
}
after calling swap ,what are yhe values x&y?
Answer Posted / selloorhari
After calling the function swap(), the values of x,y will be
the same.
i.e. x = 2, y = 3.
The scope of the variables x,y,temp in the swap() function
lies inside the function swap() itself. So there will not be
any change in the values of x,y in the main() function..
Is This Answer Correct ? | 17 Yes | 0 No |
Post New Answer View All Answers
What are the types of arrays in c?
What is a loop?
What are structure types in C?
Difference between strcpy() and memcpy() function?
What is the difference between printf and scanf in c?
Explain b+ tree?
Explain the properties of union.
why programs in c are running with out #include
Explain the difference between getch() and getche() in c?
What is the best organizational structure?
How do I swap bytes?
How can I make sure that my program is the only one accessing a file?
What is a node in c?
Write a C program to count the number of email on text
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles