#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 tq means in chat?
Can we increase size of array in c?
Explain what is a pragma?
What is a 'null pointer assignment' error?
What are 'near' and 'far' pointers?
What is logical error?
Are there namespaces in c?
What are high level languages like C and FORTRAN also known as?
What are the different types of control structures?
c program for searching a student details among 10 student details
What is scope of variable in c?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
Is it better to use malloc() or calloc()?
Why isn't it being handled properly?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?