HOW TO SWAP TWO NOS IN ONE STEP?

Answer Posted / venkatesh sabinkar

#include<stdio.h>
#include<conio.h>
void main()
{
int a=5,b=2,t;
clrscr();
printf("a=%d,b=%d",a,b,b=t,a=b,t=a);
getch();
}

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does %c mean in c?

652


Explain the difference between structs and unions in c?

576


how do you programme Carrier Sense Multiple Access

1518


How many levels deep can include files be nested?

652


What is variables in c?

607






Explain what is wrong in this statement?

634


When should a type cast be used?

575


What is a union?

611


What is use of bit field?

774


Tell me what are bitwise shift operators?

658


What is the significance of scope resolution operator?

863


Is main a keyword in c?

632


Explain how do you sort filenames in a directory?

608


List the different types of c tokens?

629


How to declare pointer variables?

686