How to write in a function declaration and in function call in
which the function has 'n' number of varible or arguments?
Answers were Sorted based on User's Feedback
Answer / kiran kumar yakkala
returntype function_name(int counter,...)
here first one is the counter tells about how many no are
going to use
... specifies variable no of arguments
for further clarificaiton, refer "Let us C" book
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
Describe newline escape sequence with a sample program?
How do you write a program which produces its own source code as output?
If input is 123 then how to print 100 and 20 and 3 seperately?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
How to avoid structure padding in C?
what is the hardware model of CFG( context free grammar)
What is character constants?
Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table
What does c mean in standard form?
What are the 32 keywords in c?
Write a program to check palindrome number in c programming?
Why c is called object oriented language?