write a program in C to swap two variables
Answer Posted / senthil mca sns
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter the a value:");
scanf("%d",&a);
printf("Enter the b value:");
scanf("%d",&b);
b=a+b-(a=b);
printf("After Swapping a=%d,b=%d",a,b);
getch();
}
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Write a C program to count the number of email on text
What does static variable mean in c?
What are types of structure?
What is selection sort in c?
What does s c mean on snapchat?
difference between Low, Middle, High Level languages in c ?
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
What is volatile variable in c?
Explain the properties of union. What is the size of a union variable
Is main a keyword in c?
Why c is called free form language?
Is c object oriented?
What is the use of sizeof?
diff between exptected result and requirement?
Explain how can a program be made to print the line number where an error occurs?