two variables are added answer is stored on not for third
variable how it is possible?

Answers were Sorted based on User's Feedback



two variables are added answer is stored on not for third variable how it is possible?..

Answer / mannucse

with the help of 2way mechine instuctions,its possible
ex:
strcat(s1,s2)
means s1=s1+s2,
or else
a+=b means a=a+b.

Is This Answer Correct ?    3 Yes 0 No

two variables are added answer is stored on not for third variable how it is possible?..

Answer / ruchi

#include<stdio.h>
#include<conio.h>
int main()
{
int x=10,y=15;
x = x+y;
printf("%d",x);
getch();
}

Is This Answer Correct ?    3 Yes 0 No

two variables are added answer is stored on not for third variable how it is possible?..

Answer / sujith

I am afraid i understood the question. If the question is
defined like, u need to exchange two variables without using
a temporary variable is,

a += b;
b = a - b;
a = a - b;
Another methos is ,
a ^= b ^= a ^= b;

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Interview Questions

Why functions are used in c?

0 Answers  


How to convert a binary number to Hexa decimal number?? (Note:Do not convert it into binary and to Hexadecimal)

1 Answers   iLantus, Subex,


Is return a keyword in c?

0 Answers  


Why we not create function inside function.

0 Answers  


What are the advantages of union?

0 Answers  






count the numbers between 100 and 300, that star with 2 and ends with 2

5 Answers   Mind Tree,


to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

0 Answers  


True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type

7 Answers  


What is the difference between text and binary i/o?

0 Answers  


how can make variable not in registers

1 Answers   TCS,


Explain what are its uses in c programming?

0 Answers  


What is the difference between int main and void main?

0 Answers  


Categories