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

How do you sort a Linked List (singly connected) in O(n) please mail to pawan.10k@gmail.com if u can find an anser...i m desperate to knw...

6 Answers   Microsoft, MSD, Oracle,


#define SQR(x) x * x main() { printf("%d", 225/SQR(15)); } a. 1 b. 225 c. 15 d. none of the above

3 Answers   HCL,


Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.

0 Answers  


main() { char c=' ',x,convert(z); getc(c); if((c>='a') && (c<='z')) x=convert(c); printf("%c",x); } convert(z) { return z-32; }

1 Answers  


main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }

2 Answers   Wipro,






void main () { int x = 10; printf ("x = %d, y = %d", x,--x++); } a. 10, 10 b. 10, 9 c. 10, 11 d. none of the above

2 Answers   HCL,


main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }

2 Answers   Adobe, CSC,


void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }

1 Answers  


Write a C program to print look and say sequence? For example if u get the input as 1 then the sequence is 11 21 1211 111221 312211 12112221 .......(it counts the no. of 1s,2s etc which is in successive order) and this sequence is used in run-length encoding.

1 Answers  


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

2 Answers  


main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }

1 Answers  


main() { clrscr(); } clrscr();

2 Answers  


Categories