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 to write in a function declaration and in function call in
which the function has 'n' number of varible or arguments?

Answer Posted / aravind

#include<stdio.h>
int example(int );/*function prototype*/
int main()
{
int a[4]={1,2,3,4,5},i;
example(a[0]);/*function call*/
printf("a=%d",a[i]);
}
int example(int b[k])/*function defintion*/
{
int j;
for(j=0;j<=4;j++)
printf("%d",b[j]);
}
/*here i took n=4*/

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by keywords in c?

1036


Explain the difference between the local variable and global variable in c?

1025


Tell me when would you use a pointer to a function?

1011


will u please send me the placement papers to my mail???????????????????

1794


What does the format %10.2 mean when included in a printf statement?

1588


how to find binary of number?

4337


what are non standard function in c

1849


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5400


What is dynamic memory allocation?

1283


What is the difference between array and pointer in c?

1090


What is scanf_s in c?

1067


What are the two types of functions in c?

943


What is a structure in c language. how to initialise a structure in c?

1020


What is the value of h?

988


What does %c do in c?

939