Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Are the variables argc and argv are always local to main?

975


What are the 4 types of programming language?

1064


Is r written in c?

1117


Explain how many levels deep can include files be nested?

1037


the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....

23617


How is null defined in c?

1110


Explain heap and queue.

1022


In a switch statement, explain what will happen if a break statement is omitted?

1006


When we use void main and int main?

1031


How can I open a file so that other programs can update it at the same time?

1142


What is fflush() function?

1089


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1849


Is file a keyword in c?

890


Explain what are preprocessor directives?

1026


to find the closest pair

2294