#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
Why we use break in c?
How can you access memory located at a certain address?
What 'lex' does?
How can type-insensitive macros be created?
Why c is called a mid level programming language?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
Why dont c comments nest?
Why c is a mother language?
What are the types of data structures in c?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
Can you write the function prototype, definition and mention the other requirements.
What is variable initialization and why is it important?
What are the types of type qualifiers in c?
what are the 10 different models of writing an addition program in C language?
How can you restore a redirected standard stream?