biren


{ City } berhampur
< Country > india
* Profession * student
User No # 44345
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 10
Users Marked my Answers as Wrong # 36
Questions / { biren }
Questions Answers Category Views Company eMail




Answers / { biren }

Question { Wipro, 173390 }

write a program to swap Two numbers without using temp variable.


Answer

#include
void main()
{
int a=2,b=3;
printf("before swap the value is:::");
printf("a=%d\tb=%d",a,b);
b=a+b-(a=b);
printf("after swap the value is:::");
printf("a=%d\tb=%d",a,b);
}

Is This Answer Correct ?    3 Yes 4 No

Question { Infosys, 28076 }

void main()
{
static int i = 5;
if(--i)
{
main();
printf("%d
",i);
}
}

what would be output of the above program and justify your
answer?

}


Answer

we can't call a main function with in main.

Is This Answer Correct ?    7 Yes 32 No