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
What is meant by keywords in c?
Explain the difference between the local variable and global variable in c?
Tell me when would you use a pointer to a function?
will u please send me the placement papers to my mail???????????????????
What does the format %10.2 mean when included in a printf statement?
how to find binary of number?
what are non standard function in c
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.
What is dynamic memory allocation?
What is the difference between array and pointer in c?
What is scanf_s in c?
What are the two types of functions in c?
What is a structure in c language. how to initialise a structure in c?
What is the value of h?
What does %c do in c?