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
what is the differance between pass by reference and pass 
by value.
 Question Submitted By :: Jayanta.sahoo
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is the differance between pass by reference and pass by value.
Answer
# 1
In the pass by reference we are using the pointer that is
here, we are passing only address where value is stored. but
in the case pass by value we are using ordinary variable
that is pass the value itself. here the value cannot be
changed in calling function and returning back to called
function but this is possible in call by reference
 
Is This Answer Correct ?    6 Yes 0 No
Shalini
 
  Re: what is the differance between pass by reference and pass by value.
Answer
# 2
in pass by value only the actual value of a variable is 
copied to a formal parameter & it doesn't effects the 
actual value when any operations r done on it
where
 in pass by refference we r sending address of variables it 
gives exact results but any oprations done on it may effect 
actual values
 
Is This Answer Correct ?    5 Yes 0 No
Vijaya
 
 
 
  Re: what is the differance between pass by reference and pass by value.
Answer
# 3
pass by value :passing the varibles directly into function 
augments

pass by reference:
passing the address of the pointer varible
 
Is This Answer Correct ?    0 Yes 3 No
Vasanth
 
  Re: what is the differance between pass by reference and pass by value.
Answer
# 4
In pass by value we can pass value through the arguments

In pass reference with the help of operation
 
Is This Answer Correct ?    1 Yes 1 No
Srikanth
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
What is the output for the following program #include<stdio.h> main() { char a[5][5],flag; a[0][0]='A'; flag=((a==*a)&&(*a==a[0])); printf("%d\n",flag); } ADITI5
What is true about the following C Functions a.Need not return any value b.Should always return an integer c.Should always return a float d.Should always return more than one value. TCS7
what is the value of 'i'? i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green") Cadence4
which header file contains main() function in c? TCS3
ABCDCBA ABC CBA AB BA A A  1
what is output of the following statetment?Printf(“%x”, -1<<4); ?  3
what is the difference between arrays and linked list Tech-Mahindra15
do ne body have any idea about the salary for the we r going to have interview. yup .. u got it right ..i m talking abt NIC.  1
who will call your main function in c under linux?  2
Binary tree traversing Qualcomm1
2.main { int x,j,k; j=k=6;x=2; x=j*k; printf("%d", x); HCL6
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
Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1  6
main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } Find the Outputs? CitiGroup7
explain about storage of union elements. Bosch2
what is compiler  5
write a program that explain #define and # undef directive  1
Two's compliment of -5 Adobe3
main() { int i=400,j=300; printf("%d..%d"); } ME8
Write a C program to print 1 2 3 ... 100 without using loops?  5
 
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