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 associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
What does void main return?
Explain what is the advantage of a random access file?
what is reason of your company position's in india no. 1.
What are two dimensional arrays alternatively called as?
What do you mean by a sequential access file?
Explain Basic concepts of C language?
write a progrmm in c language take user interface generate table using for loop?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
Explain how can you tell whether two strings are the same?
how many errors in c explain deply
How many parameters should a function have?
Explain what is the benefit of using an enum rather than a #define constant?
praagnovation
Write a factorial program using C.