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 / shankar
Value remain same hare....I.E :- X=2,y=3.Because here rules of call by value is applied. If we use call by reference the only value is changed .
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is #include called?
what do you mean by enumeration constant?
What is abstract data structure in c?
When is a void pointer used?
What is the use of typedef in c?
What is the difference between single charater constant and string constant?
Hai what is the different types of versions and their differences
what does static variable mean?
Why n++ execute faster than n+1 ?
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
What is void pointers in c?
How can I read data from data files with particular formats?
Describe dynamic data structure in c programming language?
Write a factorial program using C.