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 |
Explain what is a program flowchart and explain how does it help in writing a program?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
What is indirection? How many levels of pointers can you have?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
5 Answers TCS, Vimukti Technologies,
What is volatile keyword in c?
Where are some collections of useful code fragments and examples?
Which is better oop or procedural?
wat is the difference between array and pointer?
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
What is the function of volatile in c language?
Explain the difference between structs and unions in c?
what will be the output off the following program? #include<stdio.h> int main() { int a; a=015+0*71+5; printf("%d,a"); return0; }