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
largest Of three Number using without if condition?
What is variable initialization and why is it important?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
How can I manipulate individual bits?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
What are identifiers and keywords in c?
Differentiate fundamental data types and derived data types in C.
the question is that what you have been doing all these periods (one year gap)
Write a program to generate the Fibinocci Series
What is sorting in c plus plus?
What does != Mean in c?
Tell us something about keyword 'auto'.
Explain how do you view the path?
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
What is #include stdio h and #include conio h?