Write a program to swap two numbers without using a temporary variable?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

C,c++, Java is all are structural oriented or procedure oriented language..?

6 Answers  


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

0 Answers  


Write a program to check palindrome number in c programming?

0 Answers  


What is the c value paradox and how is it explained?

0 Answers  


a C prog to swap 2 no.s without using variables just an array?

5 Answers   TCS,






what would be the output of the following program? main() { int k = 123; char *ptr; ptr = &k; printf("%d",*ptr); }

4 Answers  


program that accepts amount in figures and print that in words

2 Answers   Infosys, Lovely Professional University, Wipro,


I didn't count the ducks that I saw in line, but I do remember that one duck was in front of two ducks, another duck behind two ducks. How many ducks did I see?

2 Answers  


what is volatile in c language?

9 Answers   Cap Gemini, HCL, Honeywell, TCS, Tech Mahindra,


Why isnt any of this standardized in c?

0 Answers  


Why do we use int main?

0 Answers  


Just came across this question, felt worth sharing, so here it is I want you to make a C/C++ program that for any positive integer n will print all the positive integers from 1 up to it and then back again! Let's say n=5 I want the program to print: 1 2 3 4 5 4 3 2 1. Too easy you say? Okay then... You can ONLY USE: 1 for loop 1 printf/cout statement 2 integers( i and n) and as many operations you want. NO if statements, NO ternary operators, NO tables, NO pointers, NO functions!

1 Answers  


Categories