write a program to swap two variables a=5 , b= 10 without
using third variable
Answer Posted / shafi.shaik
main()
{
int a,b;
clrscr();
printf("enter a, b Value");
scanf("%d%d",&a,&b);
printf("\n%d",a);
printf("\n%d",b);
b=b-a;
a=a+b;
b=a-b;
printf("\n%d",a);
printf("\n%d",b);
getch();
}
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
How do you list files in a directory?
What is pre-emptive data structure and explain it with example?
What does %c mean in c?
What are the two types of functions in c?
What is use of null pointer in c?
What does do in c?
Write a program to print “hello world” without using semicolon?
How can a string be converted to a number?
Write a program of advanced Fibonacci series.
What is oops c?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
What is identifiers in c with examples?
How can I pad a string to a known length?
Why c is called top down?
Explain how do you determine a file’s attributes?