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
Why pointers are used in c?
Explain what is a program flowchart and explain how does it help in writing a program?
Difference between MAC vs. IP Addressing
What are variables c?
What is the use of putchar function?
i want to switch my career from quailty assurance engineering to development kindly guide me from which programming language its better for me to start plz refer some courses or certifications too i have an experience of 1.5 yrs in QA field.Kindly guide me
What are all different types of pointers in c?
The statement, int(*x[]) () what does in indicate?
What is function what are the types of function?
Explain a file operation in C with an example.
What is a macro in c preprocessor?
What will be the outcome of the following conditional statement if the value of variable s is 10?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
What is a pointer variable in c language?
What is the purpose of 'register' keyword in c language?