how to swap 2 numbers in a single statement?

Answer Posted / uj

(x ^= y), (y ^= x), (x ^= y);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are preprocessor directives?

617


What is the right type to use for boolean values in c? Is there a standard type?

555


What is the purpose of main() function?

648


Why is C language being considered a middle level language?

643


Can we access the array using a pointer in c language?

554






What is strcmp in c?

591


Explain is it valid to address one element beyond the end of an array?

724


What is function and its example?

619


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

719


Write a program to print factorial of given number using recursion?

595


What are extern variables in c?

539


Explain how do I determine whether a character is numeric, alphabetic, and so on?

644


Multiply an Integer Number by 2 Without Using Multiplication Operator

311


Can an array be an Ivalue?

657


Write a C program to count the number of email on text

1410