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 |
Whether there can be main inside another main?If so how does it work?
What are identifiers c?
plz answer.. a program that takes a string e.g. "345" and returns integer 345
Program to find larger of the two numbers without using if-else,while,for,switch
What is clrscr ()?
What is #line used for?
What are enumerated types?
write a Program to dispaly upto 100 prime numbers(without using Arrays,Pointer)
26 Answers ADITI, iFlex, Infosys, Oracle, TCS, Unicops, Wipro,
What is ponter?
which is the best antivirus and how to update it
Is it possible to pass an entire structure to functions?
what is the difference between while and do while?