Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



How to write in a function declaration and in function call in which the function has 'n'..

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

How to write in a function declaration and in function call in which the function has 'n'..

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

Post New Answer

More C Interview Questions

Whether there can be main inside another main?If so how does it work?

14 Answers   Sail, Wipro,


What are identifiers c?

0 Answers  


plz answer.. a program that takes a string e.g. "345" and returns integer 345

4 Answers  


Program to find larger of the two numbers without using if-else,while,for,switch

11 Answers   iNautix, Wipro,


What is clrscr ()?

0 Answers  


What is #line used for?

0 Answers  


What are enumerated types?

0 Answers  


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?

0 Answers   TCS,


which is the best antivirus and how to update it

7 Answers   Infosys,


Is it possible to pass an entire structure to functions?

0 Answers  


what is the difference between while and do while?

2 Answers  


Categories