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 wild pointer in c?

0 Answers  


how to add our own function in c library please give details.?

1 Answers   TCS,


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

0 Answers  


What is a C array and illustrate the how is it different from a list.

1 Answers   Amazon,


How many levels of pointers can you have?

0 Answers  


What is self-referential structure in c programming?

0 Answers  


Write a C program in Fibonacci series.

0 Answers   iNautix,


Write a programme to find even numbers without using any conditional statement?

3 Answers   ADD Software, Infosys,


Is flag a keyword in c?

0 Answers  


sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2; Find the value of x?

4 Answers   Subex,


write a program to copy the string using switch case?

0 Answers   Mind Tree,


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

0 Answers  


Categories