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
Explain how do you declare an array that will hold more than 64kb of data?
design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.
What are void pointers in c?
What is adt in c programming?
Is c is a low level language?
Explain what is the difference between null and nul?
What is an endless loop?
Compare array data type to pointer data type
Explain what happens if you free a pointer twice?
What is wrong with this statement? Myname = 'robin';
Is c is a middle level language?
Is there a way to jump out of a function or functions?
Why is void main used?
Tell us two differences between new () and malloc ()?
Can you explain the four storage classes in C?