What is the difference between pass by reference and pass by
value?

Answer Posted / ganesh

in pass by referce function can access original memory
location of variable so can access value while in case of
pass by value fuction can copy the value of variable to the
prototype of its kind of variable so calling funcion can
access the prototype variable but not the direct original
variable.

Is This Answer Correct ?    16 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use oops?

588


What are the 3 principles of oop?

612


officer say me - i am offered to a smoking , then what can you say

1576


What are the benefits of interface?

573


Why do we use encapsulation in oops?

518






write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1787


Can static class have constructor?

581


What is difference between multiple inheritance and multilevel inheritance?

598


How do you define a class in oop?

624


What is difference between class and object with example?

560


How to hide the base class functionality in Inheritance?

634


What is polymorphism and types?

594


What is the renewal class?

2161


What is the highest level of cohesion?

568


#include #include #include #include void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort

2061