write a program to swap Two numbers without using temp variable.
Answer Posted / guest
# include "stdio.h"
main()
{
int a,b;
printf("enter two numbers for swaping");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("a is %d",a);
printf("b is %d",b);
} output:- takea,b value is 2,3 and give answers is3,2
| Is This Answer Correct ? | 243 Yes | 58 No |
Post New Answer View All Answers
Is multithreading possible in c?
What is the difference between if else and switchstatement
What is the right type to use for boolean values in c? Is there a standard type?
What is assert and when would I use it?
Explain what is wrong with this program statement?
What is an arrays?
What is wild pointer in c?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
How do I read the arrow keys? What about function keys?
Write a simple code fragment that will check if a number is positive or negative.
What is the ANSI C Standard?
Explain what’s a signal? Explain what do I use signals for?
What is the use of sizeof?
How do c compilers work?
What is dynamic memory allocation?