#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 / chitra
10 5
5 5
| Is This Answer Correct ? | 3 Yes | 9 No |
Post New Answer View All Answers
What does the error message "DGROUP exceeds 64K" mean?
What is the difference between the local variable and global variable in c?
What are the salient features of c languages?
What is a class c rental property?
Is linux written in c?
Where does the name "C" come from, anyway?
What is memcpy() function?
Write the control statements in C language
What is the difference between far and near ?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
What is getch () for?
Why main is not a keyword in c?
Write a program for Overriding.