write a program to swap Two numbers without using temp variable.
Answer Posted / ashish omar
Suppose: a = 3
b=2;
11
10
a = a ^ b;
11
10
==
01
b = a ^ b;
01
10
==
11
a = a ^ b;
01
11
==
10
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why do we use header files in c?
Give differences between - new and malloc() , delete and free() ?
What is the use of function in c?
What is the use of sizeof?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
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
Explain the use of bit fieild.
Explain is it valid to address one element beyond the end of an array?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
What is difference between scanf and gets?
What does typedef struct mean?
how to capitalise first letter of each word in a given string?
What are 'near' and 'far' pointers?
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.