how to swap two integers 1 and 32767 without using third
variable

Answer Posted / jonu

a=1;
b=32767;

a=(a+b)-(b=a);

printf("%d %d",a,b);

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

1780


what type of questions arrive in interview over c programming?

1545


What is typedf?

662


What is meant by type specifiers?

650


Can we declare function inside main?

558






Lists the benefits of c programming language?

580


Who invented b language?

904


Difference between macros and inline functions? Can a function be forced as inline?

700


What is the difference between malloc() and calloc()?

609


Can you write the function prototype, definition and mention the other requirements.

650


List a few unconditional control statement in c.

552


What is the difference between abs() and fabs() functions?

599


What is advantage of pointer in c?

681


a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode

643


What are the keywords in c?

636