HOW TO SWAP TWO NOS IN ONE STEP?

Answer Posted / vijay

#include<stdio.h>
main()
{
int a=5,b=9;
printf("%d %d \n",a,b);
a^=b^=a^=b;
printf("%d %d \n",a,b);
}

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is struct padding needed?

622


What is getch?

624


Do you know the difference between malloc() and calloc() function?

602


What are high level languages like C and FORTRAN also known as?

672


What is pragma c?

603






Why is void main used?

609


What are unions in c?

569


What is meant by operator precedence?

665


What is the newline escape sequence?

576


What is an identifier?

618


What is meant by int main ()?

712


How to compare array with pointer in c?

611


How can I read data from data files with particular formats?

594


Explain what is the benefit of using enum to declare a constant?

579


What is define c?

565