How many ways are there to swap two numbers without using
temporary variable? Give the each logic.
Answer Posted / chandan doki
void main()
{
int a,b;
printf("eneter any two values for a and b");
scanf("%d%d",&a,&b);
b=a+b;
a=b-a;
b=b-a;
printf("a=%d\nb=%d",a,b);
getch();
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are identifiers c?
What does sizeof return c?
What is the difference between far and near in c?
What is an expression?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
why wipro wase
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
What is pass by value in c?
What is sizeof array in c?
where are auto variables stored? What are the characteristics of an auto variable?
How do I send escape sequences to control a terminal or other device?
Why doesn't C support function overloading?
What 'lex' does?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
Can you please compare array with pointer?