write a program to swap Two numbers without using temp variable.
Answer Posted / dally
#include<stdio.h>
int main()
{
int a,b;
printf("Enter values for a,b\n");
scanf("%d %d",&a,&b);
b = b+a;
a= b-a;
b=b-a;
printf("a = %d,b = %d",a,b);
}
Is This Answer Correct ? | 18 Yes | 11 No |
Post New Answer View All Answers
Explain c preprocessor?
What is the scope of static variable in c?
What are the types of unary operators?
write a program for the normal snake games find in most of the mobiles.
What are the advantages of the functions?
What is pragma in c?
What is the sizeof () operator?
What are c identifiers?
How can I call a function with an argument list built up at run time?
What is the description for syntax errors?
What are data structures in c and how to use them?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
what is event driven software and what is procedural driven software?
What does 3 periods mean in texting?
What is .obj file in c?