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

Answer Posted / naresh

main()
{
int a,b,c;
printf("enter a,b value");
scanf("%d%%d",&a,&b);
c=a^=b^=a^=b;
printf("%d",c);
}

Is This Answer Correct ?    67 Yes 150 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are enumerated types?

828


What is the difference between text and binary modes?

849


Can we assign integer value to char in c?

799


Can you please explain the difference between strcpy() and memcpy() function?

795


Why string is used in c?

738






How do you use a 'Local Block'?

903


Can a variable be both static and volatile in c?

784


Can you think of a logic behind the game minesweeper.

2192


I have seen function declarations that look like this

771


Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80

2820


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

2258


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

2000


What is #define in c?

796


What’s the special use of UNIONS?

846


What is array in C

894