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 the purpose of sprintf?
Write a program in c using only loops to print * * * * * *******
please give me some tips for the placement in the TCS.
Tell us bitwise shift operators?
write a c code "if you give a any decimal number then print that number in english alphabet"? ex: i/p: 552 o/p: five hundred fifty two ...
Why do we write return 0 in c?
WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h> #include<conio.h> void main() { int k=20; printf("%d%d%d%d",k,k++,++k,k); getch(); }
Write a program to check prime number in c programming?
What does typeof return in c?
Tell me about low level programming languages.
main() { int a = 65; printf(“%d %o %x”,a,a,a); } Output 65 101 41 Please explain me.How it is coming like that?
What is a lvalue