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
Was 2000 a leap year?
Write a progarm to find the length of string using switch case?
What are the advantages of using new operator as compared to the function malloc ()?
What are the types of type specifiers?
When should you use a type cast?
What is the use of the function in c?
How do you list files in a directory?
Write a program for finding factorial of a number.
What does p mean in physics?
Why c is called a mid level programming language?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
What is the significance of c program algorithms?
Why array is used in c?