how does a general function , that accepts an array as a
parameter, "knows" the size of the array ?
How should it define it parameters list ?
Answers were Sorted based on User's Feedback
Answer / ilana
one option :
myfunc (int my_array[], int n ) { ...}
another option:
myfunc (int *my_array, int n ) { ...}
Is This Answer Correct ? | 12 Yes | 5 No |
Answer / ganesh bankar
its compilers job to identify what is the size the array
depending upon which array is passed to the function.
Is This Answer Correct ? | 7 Yes | 1 No |
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What is true about the following C Functions (a) Need not return any value (b) Should always return an integer (c) Should always return a float (d) Should always return more than one value
Why do we need arrays in c?
What are local static variables?
What is the diffences between Windows XP and Windows Visa
What are the storage classes in C?
What is typedef example?
Dear Sir, we are required the bubble sorting programs Regs Prem
What is the use of a semicolon (;) at the end of every program statement?
what is computer engg
#define MAX 3 main() { printf("MAX = %d \n",MAX ); #undef MAX #ifdef MAX printf("Vector Instituteā); #endif
how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y