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 can you increase the size of a statically allocated array?
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
Explain how do you generate random numbers in c?
What is infinite loop?
What is typedf?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
What is the auto keyword good for?
What are pragmas and what are they good for?
what is the significance of static storage class specifier?
How are pointers declared in c?
What is abstract data structure in c?
Write programs for String Reversal & Palindrome check
What is the difference between strcpy() and memcpy() function in c programming?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
Where is c used?