How to swap two values using a single variable ?
condition: Not to use Array and Pointer ?
Answer Posted / aditya
main(){
int a=10,b=20;
printf("%d%d",a,b);
a^=b,b^=a,a^=b;
printf("%d%d",a,b);
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
Is c procedural or object oriented?
What is sizeof int in c?
What does double pointer mean in c?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
Write a program to identify if a given binary tree is balanced or not.
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
Is it valid to address one element beyond the end of an array?
Can we replace the struct function in tree syntax with a union?
explain what is fifo?
What is a far pointer in c?
What is s in c?
What does sizeof int return?
How can I get the current date or time of day in a c program?