How can you pass an array to a function by value?
Answer / Bushra Saher
In C, arrays decay into pointers when passed as arguments, so passing an array to a function is effectively passing its address. To pass an entire array by value, use a pointer to the first element of the array.
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the output of the following program? main() { int c[]={2,8,3,4,4,6,7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf("%d",*c); ++q; } for(j=0;j<5;j++) { printf("%d",*p); ++p; } }
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
Is anything faster than c?
What is the purpose of the statement: strcat (S2, S1)?
Compare interpreters and compilers.
what is the full form of c language
wite a programme in c to linear search a data using flag and without using flags?
What are the applications of c language?
What are keywords c?
what are bps & baud rates? differentiate these two?
What is the general form of function in c?