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
How many types of operators are there in c?
Explain that why C is procedural?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
Is it better to use malloc() or calloc()?
What is the difference between mpi and openmp?
What are the features of c language?
What does %c mean in c?
Write a C program in Fibonacci series.
Explain built-in function?
What is the difference between memcpy and memmove?
What are the types of assignment statements?
explain what is a newline escape sequence?
Differentiate between full, complete & perfect binary trees.
What is the use of define in c?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }