#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d\n",x,y);
swap2(x,y);
printf("%d %d\n",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}
what are the outputs?
Answer Posted / goodhunter
10 5
10 5
| Is This Answer Correct ? | 20 Yes | 2 No |
Post New Answer View All Answers
What is d scanf?
Is printf a keyword?
What is meant by int main ()?
write a c program for swapping two strings using pointer
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
What is a null string in c?
What is getch () for?
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
Explain the array representation of a binary tree in C.
What is the total generic pointer type?
Explain the difference between malloc() and calloc() in c?
what is different between auto and local static? why should we use local static?
Explain enumerated types in c language?
Explain how do you sort filenames in a directory?
What is the difference between variable declaration and variable definition in c?