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

Explain what is meant by high-order and low-order bytes?

0 Answers  


What is a pointer on a pointer in c programming language?

0 Answers  


what is stack , heap ,code segment,and data segment

0 Answers  


Explain how do you use a pointer to a function?

0 Answers  


What does it mean when the linker says that _end is undefined?

0 Answers  






how to reverse string "Hello World" by using pointers only. Without any temp var

1 Answers  


How can I prevent another program from modifying part of a file that I am modifying?

0 Answers  


What are the features of c language?

0 Answers  


`write a program to display the recomended action depends on a color of trafic light using nested if statments

0 Answers  


Explain the use of keyword 'register' with respect to variables.

0 Answers  


what are advantages of U D F?

1 Answers   Google,


Write a program to reverse a given number in c?

0 Answers  


Categories