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 the test cases for checking a variable having value in range -10.0 to +10.0?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
Does c have function or method?
What are the advantages of union?
How can you tell whether a program was compiled using c versus c++?
Which is best linux os?
What are the different types of linkage exist in c?
Explain spaghetti programming?
Why malloc is faster than calloc?
How can you find the day of the week given the date?
Explain setjmp()?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
What functions are used in dynamic memory allocation in c?
Is javascript written in c?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)