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 ?    2 Yes 0 No
Sujith
 
 
 
  Re: two variables are added answer is stored on not for third variable how it is possible?
Answer
# 3
#include<stdio.h>
#include<conio.h>
int main()
{
  int x=10,y=15; 
 x = x+y;
printf("%d",x);
     getch();
     }
 
Is This Answer Correct ?    0 Yes 0 No
Ruchi
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Function to find the given number is a power of 2 or not? Motorola12
what is out put of the following code? #include class Base { Base() { cout<<"constructor base"; } ~Base() { cout<<"destructor base"; } } class Derived:public Base { Derived() { cout<<"constructor derived"; } ~Derived() { cout<<"destructor derived"; } } void main() { Base *var=new Derived(); delete var; } Honeywell2
what are two categories of clint-server application development ?  1
what is pointer ? Kernex-Micro-Systems7
What's the best way to declare and define global variables?  5
15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?  1
how to print "hai" in c?  10
n=7623 { temp=n/10; result=temp*10+ result; n=n/10 } Wipro4
What are bit fields? What is their use? Adobe1
12. Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV Accenture4
pgm to find middle element of linklist(in efficent manner) Huawei2
Can we include one C program into another C program if yes how? Infosys4
Sir i want e-notes of C languge of BAlaguruswami book i.e scanned or pdf file of balaguruswamy book on c language.PLEASE SEND ME on my mail id ajit_kolhe@rediff.com  4
What's a "sequence point"?  2
C,c++, Java is all are structural oriented or procedure oriented language..?  3
write a c program to print a given number as odd or even without using loop statements,(no if ,while etc)  4
How would you print out the data in a binary tree, level by level, starting at the top? Microsoft4
2.main { int x,j,k; j=k=6;x=2; x=j*k; printf("%d", x); HCL6
Write a program to write a given string in maximum possibilities? i.e str[5]="reddy"; i.e we can write this string in 120 ways for that write a program Subex3
write a code for large nos multilication (upto 200 digits) Persistent1
 
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