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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 


 

Company >> ACC >> Interview Questions >> C Interview Questions
 
  C Code Interview Questions (1)   General Aptitude Interview Questions (1)   APPSC AllOther Interview Questions (1)
  Call Centre AllOther Interview Questions (7)   Accounting AllOther Interview Questions (7)   Taxation Interview Questions (2)
  CompanyAffairs CS Interview Questions (1)   Business Management AllOther Interview Questions (1)   Marketing Sales Interview Questions (2)
  Electrical Engineering Interview Questions (5)   Mechanical Engineering Interview Questions (1)   WebMethods Interview Questions (1)
  Oracle Apps Financial Interview Questions (3)   Oracle Apps Technical Interview Questions (2)   Siebel Interview Questions (1)
  SAP CRM Interview Questions (1)   HR Interview Questions (1)   FI CO Interview Questions (6)
  MM Interview Questions (2)   SD Interview Questions (3)   ABAP Interview Questions (4)
  HR Questions Interview Questions (6)   Data Warehouse General Interview Questions (1)   ETL Interview Questions (1)
  SAS Interview Questions (3)   Informatica Interview Questions (1)   JDBC Interview Questions (1)
  Core Java Interview Questions (3)   JCL Interview Questions (1)   Test Documents Reporting Interview Questions (1)
  Test Cases Interview Questions (1)   Manual Testing Interview Questions (7)   Automation Testing AllOther Interview Questions (1)
  QTP Interview Questions (1)   WinRunner Interview Questions (3)   Data Structures Interview Questions (1)
  SQL PLSQL Interview Questions (6)   MySQL Interview Questions (8)   SQL Server Interview Questions (1)
  Dot Net AllOther Interview Questions (1)   Dot Net General Interview Questions (1)   Dot Net Framework Interview Questions (1)
  ASP.NET Interview Questions (1)   C Sharp Interview Questions (2)   Networking Administration Interview Questions (3)
  Programming Languages AllOther Interview Questions (1)   C Interview Questions (5)
 
Back to Questions Page
Question   void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case Rank Answer Posted By  
 Interview Question Submitted By :: Bala
I also faced this Question!!   © ALL Interview .com
Answer
NO,if the values of a&b are 10,20 respectively., Then
   a=a+b becomes "a=30"
   b=a-b becomes  b=30-20  i.e., "b=10"
   a=a-b gives  a=30-10    i.e., "a=20"
 
0 K.kavitha
 
 
Answer
provided a+b is between the int minimum and int maximum

so the answer is no.
 
0 Mangala Pandi P
 
 
Answer
NO 
Means we can give diff values give different answer.
like
we can give a=80,b=100
a=180,b=20,a=20
 
0 Sunny
 
 
 
Answer
Sorry, it does nott.. :-)
it works proper..
 
0 Shruti
 
 
Answer
no,result will depend on the values of a nd b
 
0 Sourabh
 
 
Answer
Actually this code is for interchanging values of two 
variables without using third variable
 
0 Prateek
 
 
Question   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 Rank Answer Posted By  
 Interview Question Submitted By :: Harsha
I also faced this Question!!   © ALL Interview .com
Answer
B)only 2
 
0 Rakesh
 
 
Answer
error: wrong type argument to increment
 
0 Basha
 
 
Answer
2
 
0 Fakkad
 
 
Answer
2 gives the error because array name is nothing but a
constant pointer we cannot increment the constant pointer so
it will give error
 
0 Jaleelbaig
 
 
Question   6. Which of the Following is not defined in string.h? A)strspn() B)strerror() C)memchr() D)strod() Rank Answer Posted By  
 Interview Question Submitted By :: Harsha
I also faced this Question!!   © ALL Interview .com
Answer
d, strod is not avaliable
 
0 Vishnu948923
 
 
Question   what will be the output: main(){char ch;int a=10;printf("%d",ch);} Rank Answer Posted By  
 Interview Question Submitted By :: Sandipan
I also faced this Question!!   © ALL Interview .com
Answer
ans ch=0
if we print a it wil be 10
 
0 Reddy
 
 
Answer
It'll give a warnin tat "a is never used...If u Continue 
executing...it will the memory addres that is currently 
used.
 
0 Paul
 
 
Answer
The answer is Garbage value... 
The answer willbe lik -113...Depending upon the compailer
If we declare as.. 
 static char ch;
Then Answer is 0.....
 
2 Bharath S
 
 
Answer
it will print 64
 
0 Ruth
 
 
 
Back to Questions Page
 
 
 
 
 
   
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