write a program to swap two variables a=5 , b= 10 without
using third variable
Answer Posted / dhanalakshmi
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf("enter the a value"));
scanf("%d",&a);//a=10
printf("enter the b value");
scanf("%d",&b);//b=5
b=b+a;
a=b-a;
b=b-a;
printf("\n The value of A is:%d",a);
printf("\n The value of B is:%d",b);
}
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
Write the test cases for checking a variable having value in range -10.0 to +10.0?
Why do we need arrays in c?
What language is c written?
number of times a digit is present in a number
Define circular linked list.
Explain goto?
Explain the difference between #include "..." And #include <...> In c?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
Explain heap and queue.
What is union in c?
if p is a string contained in a string?
Explain what are the different data types in c?
What does the function toupper() do?
What is the value of c?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)