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
How many levels deep can include files be nested?
Write a program to print factorial of given number without using recursion?
What is a dynamic array in c?
What is the right way to use errno?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
What is the difference between printf and scanf in c?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
How many loops are there in c?
What is auto keyword in c?
Why do we use return in c?
Why is c so important?
how many errors in c explain deply
How many keywords are there in c?
Define the scope of static variables.
Why c is called a middle level language?