write a program to swap Two numbers without using temp variable.
Answer Posted / ankit
a=a+b;
b=a-b;
a=a-b;
example int a=2;int b=3
put a=2 & b=3
a=2+3;
b=5-3;
a=5-2;
a=3;
b=2;
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is character set?
Is register a keyword in c?
What is boolean in c?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
What is the mean of function?
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
What is derived datatype in c?
What is c programing language?
What are the header files used in c language?
What is class and object in c?
What is conio h in c?
please give me some tips for the placement in the TCS.
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Is it acceptable to declare/define a variable in a c header?
Differentiate between a for loop and a while loop? What are it uses?