write a program to swap Two numbers without using temp variable.

Answer Posted / joshin

main()
{
printf("enter two number");
scanf("%d%d",&a,&b);
printf("swaped result is b=%d\na=%d",b,a);
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How are pointers declared in c?

590


How can you check to see whether a symbol is defined?

583


What is scope rule in c?

595


Why does this code crash?

610


What are the two types of functions in c?

553






Why void is used in c?

555


When should a far pointer be used?

589


Why does the call char scanf work?

609


Explain how do you view the path?

644


What does do in c?

599


Explain is it better to bitshift a value than to multiply by 2?

703


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

689


Explain the concept and use of type void.

619


how is the examination pattern?

1587


How can variables be characterized?

1637