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
Write a progarm to find the length of string using switch case?
Explain what is the best way to comment out a section of code that contains comments?
Is it acceptable to declare/define a variable in a c header?
Can a local variable be volatile in c?
Explain what is the general form of a c program?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
Explain what is a 'locale'?
What is the difference between text and binary i/o?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
What is the use of a semicolon (;) at the end of every program statement?
What is c standard library?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
How can I find the modification date of a file?
What is pass by reference in c?
Describe the modifier in c?