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
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
write a progrmm in c language take user interface generate table using for loop?
Is there any possibility to create customized header file with c programming language?
Can you please explain the difference between exit() and _exit() function?
Why clrscr is used in c?
What is the difference between mpi and openmp?
Difference between pass by reference and pass by value?
Why do we use main function?
Explain how can I remove the trailing spaces from a string?
Is this program statement valid? INT = 10.50;
Is null equal to 0 in sql?
Explain c preprocessor?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
What are the 5 elements of structure?
What is integer constants?