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

In C programming, what command or code can be used to determine if a number of odd or even?

0 Answers  


What is use of integral promotions in c?

0 Answers  


what is pointer?

13 Answers   HCL, TCS,


What is the meaning of int *x[]();?

1 Answers  


What is Your Name :)

1 Answers  






Which is the best sort method for library management?

1 Answers   Microsoft,


n=7623 { temp=n/10; result=temp*10+ result; n=n/10 }

7 Answers   Wipro,


the maximum width of a c variable name can be a) 6 characters b) 8 characters c) 10 characters d) 20 characters

2 Answers  


difference between string and array?

6 Answers  


1,4,8,13,21,30,36,45,54,63,73,?,?.

10 Answers   AMB, Franklin Templeton,


what is the Output? int a=4 b=3; printf("%d%d%d%d%d%d",a++,++a,a++,a++,++a,a++); printf("%d%d%d%d%d%d",b--,b--,--b,b--,--b,--b);

10 Answers   IBM,


Write a C program to find the smallest of three integers, without using any of the comparision operators.

7 Answers   TCS,


Categories