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 ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..

1595


What is integer constants?

625


Write a program to print “hello world” without using semicolon?

675


What is function in c with example?

631


Explain the difference between ++u and u++?

641






What is difference between far and near pointers?

613


What is 02d in c?

638


What is a scope resolution operator in c?

752


What are the different data types in C?

730


Explain how many levels deep can include files be nested?

629


Explain logical errors? Compare with syntax errors.

632


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

659


Difference between goto, long jmp() and setjmp()?

711


What is malloc return c?

601


Are the outer parentheses in return statements really optional?

578