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

Tell about strtok & strstr functions

2 Answers   HCL, iFlex, Motorola,


Would you rather wait for the results of a quicksort, a linear search, or a bubble sort on a 200000 element array? 1) Quicksort 2) Linear Search 3) Bubble Sort

3 Answers  


what is the mean of c languages.

1 Answers   Polaris,


code for replace tabs with equivalent number of blanks

0 Answers   Bosch,


difference between i++* and *++i

6 Answers   IBM,






find the minimum of three values inputted by the user

3 Answers  


parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..

4 Answers  


What is union and structure?

0 Answers  


Are global variables static in c?

0 Answers  


Write a code to determine the total number of stops an elevator would take to serve N number of people.

0 Answers   Expedia,


Can we change the value of constant variable in c?

0 Answers  


Write a program in c to replace any vowel in a string with z?

0 Answers   IBS,


Categories