ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
two variables are added answer is stored on not for third 
variable how it is possible?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: two variables are added answer is stored on not for third variable how it is possible?
Answer
# 1
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 ?    0 Yes 0 No
Mannucse
[Kiona]
 
  Re: two variables are added answer is stored on not for third variable how it is possible?
Answer
# 2
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 ?    0 Yes 0 No
Sujith
 
 
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Write a program to remove the C comments(/* */) and C++ comments(//) from a file. The file should be declared in command line. Subex1
Difference Between embedded software and soft ware? Bosch1
How do we swap or interchange any 2 numbers without using Temporary variable...Anybody can pls answer it.. Thanks in Advance US-Technology5
printf("%d",(printf("Hello")); What it returns? TCS18
What is the purpose of Scanf Print, getchar, putchar, function?  2
write a program to insert an element at the specified position in the given array in c language  1
How to reverse a string using a recursive function, without swapping or using an extra memory? Motorola15
x=2,y=6,z=6 x=y==z; printf(%d",x) HCL7
pgm to find middle element of linklist(in efficent manner) Huawei1
how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y TCS2
fun(int x) { if(x > 0) fun(x/2); printf("%d", x); } above function is called as: fun(10); what will it print? } NDS12
what is the advantage of software development  1
WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?  3
Struct(s) { int a; long b; } Union (u) {int a; long b; } Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4 Mascot2
write a c program to check weather a particluar bit is set or not? IBM2
how to exchnage bits in a byte b7<-->b0 b6<-->b1 b5<-->b2 b4<-->b3 please mail me the code if any one know to rajeshmb4u@gmail.com Honeywell3
If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",a[0]); return 1; } what will be the output? Hughes5
what is volatile in c language? TCS1
write a program to find the number of even integers and odd integers in a given array in c language Olive-Tech2
enum day = { jan = 1 ,feb=4, april, may} what is the value of may? a)4 b)5 c)6 d)11 e)none of the above HCL2
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com