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

any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

0 Answers  


What are examples of structures?

0 Answers  


What is the function of this pointer?

0 Answers   Agilent, ZS Associates,


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

0 Answers  


Who developed c language?

0 Answers  


How can I allocate arrays or structures bigger than 64K?

5 Answers  


write a program that accepts 3 numbers from the user. dispaly the values in a descending order.

3 Answers  


find largest of 3 no

8 Answers  


here is a link to download Let_Us_C_-_Yashwant_Kanetkar

3 Answers   Microsoft,


How many levels of indirection in pointers can you have in a single declaration?

0 Answers   Agilent, ZS Associates,


what is the similarities between. system call and library function?

1 Answers   Wipro,


4)What would be the output? main() { int num=425; pf("%d",pf("%d",num)); } a)Comp error b)4425 c)4253 d)3435 e)none

10 Answers  


Categories