HOW TO SWAP TWO NOS IN ONE STEP?

Answer Posted / shiva kumar

void main()
{
int a,b;
printf("Enter two numbers\n");
scanf("%d%d",&a,&b);
b=a+b-(a=b);
printf("%d %d ",a,b);
}

Is This Answer Correct ?    28 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program that accept anumber in words

1244


Explain threaded binary trees?

670


what do u mean by Direct access files? then can u explain about Direct Access Files?

1634


How can I get the current date or time of day in a c program?

645


What is function prototype in c with example?

565






What is the difference between memcpy and memmove?

594


What is declaration and definition in c?

518


What is the purpose of scanf() and printf() functions?

710


List out few of the applications that make use of Multilinked Structures?

1280


What is difference between Structure and Unions?

632


What is a keyword?

738


How many identifiers are there in c?

571


Is c is a middle level language?

591


What is the difference between text files and binary files?

668


Explain how do you override a defined macro?

577