write a program in C to swap two variables
Answer Posted / r.aruna
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter the a value");
scanf("%d",&a);
printf("Enter the b value");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("After swapping a,b value",a,b);
getch();
}
| Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
What is the purpose of main() function?
What is a program flowchart and how does it help in writing a program?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What is difference between arrays and pointers?
Is c dynamically typed?
What are the benefits of organizational structure?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
What are the usage of pointer in c?
What is static volatile in c?
What is c language in simple words?
Why do we need functions in c?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
Explain Function Pointer?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What is the use of #include in c?