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 ?

Answers were Sorted based on User's Feedback



how does a general function , that accepts an array as a parameter, "knows" the size of ..

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

how does a general function , that accepts an array as a parameter, "knows" the size of ..

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

Post New Answer

More C Interview Questions

what is the use of bitfields & where do we use them?

2 Answers  


Output for following program using for loop only * * * * * * * * * * * * * * *

3 Answers  


what is the difference between getch() and getchar()?

10 Answers   Huawei, Infosys,


read an array and search an element

1 Answers  


How to reverse a string using a recursive function, with swapping?

5 Answers  


write a program to print largest number of each row of a 2D array

0 Answers  


What are structural members?

0 Answers  


How can I rethow can I return a sequence of random numbers which dont repeat at all?

0 Answers  


Tell me is null always defined as 0(zero)?

0 Answers  


What is f'n in math?

0 Answers  


what is the difference between NULL & NUL keywords in C?

3 Answers  


Why is conio.h not required when we save a file as .c and use clrscr() or getch() ?

2 Answers  


Categories