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

Is javascript written in c?

0 Answers  


write a program that prints a pascal triangle based on the user input(like how many stages) in an efficient time and optimized code?

3 Answers   Oracle,


What is the difference between exit() and _exit() function in c?

0 Answers  


what is the answer for it main() { int i; clrscr(); printf("%d",&i)+1; scanf("%d",i)-1; }

3 Answers  


Is boolean a datatype in c?

0 Answers  


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

0 Answers  


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

0 Answers   Zoho,


what are brk, sbrk?

1 Answers   Oracle,


WHAT IS MAXIMUM SIZE OF AN ARRAY IN C LANGUAGE?

8 Answers   Carphone Warehouse, IBM, SAS,


What is printf () in c?

0 Answers  


Explain how can I open a file so that other programs can update it at the same time?

0 Answers  


write a program to find a given no. is divisible by 3 or not without using any arthimetic operators?

3 Answers   Broadcom, TCS,


Categories