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 ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of & in scanf?

602


Why do we use namespace feature?

586


What do you mean by recursion in c?

630


What is a wrapper function in c?

592


How do I use strcmp?

645






Why header file is used in c?

582


What is f'n in math?

623


Write a program to swap two numbers without using a temporary variable?

613


What is the difference between ++a and a++?

699


When should the volatile modifier be used?

689


I need a sort of an approximate strcmp routine?

663


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

1895


Explain what is a pragma?

596


How can you return multiple values from a function?

638


Why does the call char scanf work?

622