what is variable length argument list?

Answers were Sorted based on User's Feedback



what is variable length argument list?..

Answer / rakesh

some functions allow to pass any number of arguments such as
printf ,scanf etc.

Is This Answer Correct ?    5 Yes 2 No

what is variable length argument list?..

Answer / pavan mustyala

Check out the below link!!! it gives a nice insight of this
concept.

http://www.cprogramming.com/tutorial/c/lesson17.html

Anyways, this is about a function accepting variable number
of arguments i.e., at different places of calling that
function, number of arguments can differ.

Example:
int Some_func( int param1, ... ); is the declaration to it.

the 3 dots (called ellipsis) tells the compiller that it
accepts variable number of arguments.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Code Interview Questions

main() { char * strA; char * strB = I am OK; memcpy( strA, strB, 6); } a. Runtime error. b. I am OK c. Compile error d. I am O

4 Answers   HCL,


how to check whether a linked list is circular.

11 Answers   Microsoft,


#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }

1 Answers  


1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.

8 Answers   IBPS, Infosys, TCS,


C statement to copy a string without using loop and library function..

2 Answers   Persistent, TCS,






void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }

1 Answers  


main() { extern int i; i=20; printf("%d",i); }

1 Answers   Value Labs,


Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number

2 Answers   Ace Info,


main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above

5 Answers   HCL,


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

0 Answers  


respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"

1 Answers   Genpact, Ozdocs,


#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?

1 Answers   Wipro,


Categories