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 does the c in ctime mean?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
What are header files and explain what are its uses in c programming?
what is reason of your company position's in india no. 1.
Why are algorithms important in c program?
What does malloc () calloc () realloc () free () do?
Why functions are used in c?
What is the Purpose of 'extern' keyword in a function declaration?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
What is an identifier?
Do you know what are bitwise shift operators in c programming?
Where static variables are stored in memory in c?
Explain about block scope in c?
What are called c variables?