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
How can a number be converted to a string?
What is a class c rental property?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
What is modeling?
about c language
write a program to create a sparse matrix using dynamic memory allocation.
Describe the order of precedence with regards to operators in C.
How reliable are floating-point comparisons?
What is the difference between āgā and āgā in C?
Sir i need notes for structure,functions,pointers in c language can you help me please
what will be the output for the following main() { printf("hi" "hello"); }
What is a macro?
Why is c called c not d or e?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................