write a program to swap two variables a=5 , b= 10 without
using third variable
Answer Posted / samruthi
#include<stdio.h>
void main()
{
int a=5,b=10;
printf("The value of A is:%d",a);
printf("\n The value of B is:%d",b);
b=a;
a=b;
a=b+a;
printf("\n The value of A is:%d",a);
printf("\n The value of B is:%d",b);
getch();
}
| Is This Answer Correct ? | 10 Yes | 7 No |
Post New Answer View All Answers
Why does the call char scanf work?
What is strcmp in c?
How do you redirect a standard stream?
Write a factorial program using C.
Explain heap and queue.
Define C in your own Language.
How can you determine the size of an allocated portion of memory?
Do you know what are bitwise shift operators in c programming?
provide an example of the Group by clause, when would you use this clause
What is derived datatype in c?
What is c programing language?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
Explain how does free() know explain how much memory to release?
What is the function of volatile in c language?