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
How do you list a file’s date and time?
Do variables need to be initialized?
What is function in c with example?
How many types of arrays are there in c?
Write a program for finding factorial of a number.
How can I open files mentioned on the command line, and parse option flags?
How can I sort a linked list?
What does static variable mean in c?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
What is difference between union and structure in c?
Why does notstrcat(string, "!");Work?
What is the difference between malloc calloc and realloc in c?
Write a program to reverse a given number in c?
What are Macros? What are its advantages and disadvantages?
given post order,in order construct the corresponding binary tree