a C prog to swap 2 no.s without using variables just an
array?
Answer Posted / baidyanath bisoyi
void main()
{
int a,b;
printf("enter the two numbers\n");
scanf("%d%d",&a,&b);
printf("a=%d\n b=%d\n",a,b);
a=a+b-(b=a);
printf("a=%d\n b=%d\n",a,b);
getch();
}
Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Differentiate between full, complete & perfect binary trees.
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
Is c still relevant?
How we can insert comments in a c program?
How do you print an address?
Difference between MAC vs. IP Addressing
What is quick sort in c?
List the variables are used for writing doubly linked list program.
how many key words availabel in c a) 28 b) 31 c) 32
What does struct node * mean?
Add Two Numbers Without Using the Addition Operator
Explain how can I remove the trailing spaces from a string?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
How do you define CONSTANT in C?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above