what is the differance between pass by reference and pass
by value.

Answer Posted / shalini

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 ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between exit() and _exit() function?

649


What are the advantages and disadvantages of a heap?

697


What are the advantages of using macro in c language?

585


write a progrmm in c language take user interface generate table using for loop?

1571


main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }

910






Explain union. What are its advantages?

611


Compare array data type to pointer data type

594


How do I send escape sequences to control a terminal or other device?

604


Difference between malloc() and calloc() function?

650


What is the difference between exit() and _exit() function?

596


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

662


Why does the call char scanf work?

611


Why static is used in c?

614


Can we use visual studio for c?

540


What are data types in c language?

578