C passes By value or By reference?
Answers were Sorted based on User's Feedback
Answer / rasheed
yes C passes Both by value and reference.
but strictly speaking C passes only both by value
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / rohit
it depends on us how to pass a value
because ,c can pass by both value and reference
by valu means actual val of variable ia passed
by reference address of the required value is passed
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / red dustbin
C passes only by value. When passing a pointer, the pointer
is passed by value. This is equivalent to passing by
reference but it is the progammer's choice to pass the
pointer instead of the object itself.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ravi chandra
pass by value means passing values to the function
values means numericals
and pass by reference means passing addresses of the values..
fun(int a ,int b ) //pass by value
fun(int *a,int *b)// pass by reference
pass by reference
fun(int &a,int &b)
{
}
fun(int *c,int *d) // *c=*(&a) ,*d=*(&b)
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / k.thejonath
C passes to functions by both value and by reference.
Passing by value, "you just send a variable" and by
refernce means, by passing pointer.
| Is This Answer Correct ? | 2 Yes | 3 No |
What is difference between main and void main?
Write a program to identify if a given binary tree is balanced or not.
What is dangling pointer in c?
Explain the meaning of keyword 'extern' in a function declaration.
When was c language developed?
Why is struct padding needed?
in b=6.6/a+(2*a+(3*c)/a*d)/(2/n); which operation will be performed first a) 6.6/a b) 2*a c) 3*c d) 2/n
WHO WROTE C LANGUAGE?
What is the purpose of the fflush() function in C?
progrem to generate the following series 1 12 123 1234 12345
2.Given the short c program that follows a. make a list of the memory variables in this program b.which lines of code contain operations that change the contents of memory? what are those operations? Void main( void) { Double base; Double height; Double area; Printf(“enter base and height of triangle :”); Scanf(“%lg”, &base); Scanf(“%lg”, &height); Area=base*height/2.0; Printf(“the area of the triangle is %g \n”,area); }
WHAT IS PRE POSSESSORS?