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 |
Is javascript written in c?
write a program that prints a pascal triangle based on the user input(like how many stages) in an efficient time and optimized code?
What is the difference between exit() and _exit() function in c?
what is the answer for it main() { int i; clrscr(); printf("%d",&i)+1; scanf("%d",i)-1; }
Is boolean a datatype in c?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
what are brk, sbrk?
WHAT IS MAXIMUM SIZE OF AN ARRAY IN C LANGUAGE?
8 Answers Carphone Warehouse, IBM, SAS,
What is printf () in c?
Explain how can I open a file so that other programs can update it at the same time?
write a program to find a given no. is divisible by 3 or not without using any arthimetic operators?