Write a program to exchange two variaables without temp
Answer Posted / sujith
another quick way is,
void main()
{
int a = 10, b = 5;
a ^= b ^= a ^= b;
}
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
When do we get logical errors?
When can you use a pointer with a function?
What is wrong with this declaration?
What are the different types of pointers used in c language?
How can I direct output to the printer?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
What is stack in c?
What is the modulus operator?
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 difference between memcpy and memmove?
Can you return null in c?
What is #line?
What are void pointers in c?
Explain function?