Write a program to exchange two variaables without temp
Answer Posted / srinivas
main()
{
int a=3,b=2;
a = (a+b)-(b=a);
printf("a=%d,b=%d",a,b);
}
o/p:- a=2,b=3
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
Explain the advantages and disadvantages of macros.
What are variables c?
What library is sizeof in c?
What is a rvalue?
Explain how can I write functions that take a variable number of arguments?
Is linux written in c?
When should structures be passed by values or by references?
Can a pointer be null?
Why is #define used?
Can a local variable be volatile in c?
Is c# a good language?
What are structures and unions? State differencves between them.
Define and explain about ! Operator?