write a program in C to swap two variables
Answer Posted / anju
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,temp;
scanf("%d%d",&a,&b);
printf("before swapping value of a=%d and b=%d",a,b);
temp=x;
x=y;
y=temp;
printf("after swapping value of a=%d and b=%d",a,b);
getch();
}
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is extern c used for?
#include
ATM machine and railway reservation class/object diagram
Write a program to implement queue.
What are the two types of functions in c?
How can you determine the maximum value that a numeric variable can hold?
What is a program?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
Explain how do you sort filenames in a directory?
differentiate built-in functions and user – defined functions.
What does main () mean in c?
Explain 'bit masking'?
What is an auto keyword in c?
What is the best way of making my program efficient?