what is variable length argument list?
Answers were Sorted based on User's Feedback
Answer / rakesh
some functions allow to pass any number of arguments such as
printf ,scanf etc.
| Is This Answer Correct ? | 5 Yes | 2 No |
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 |
Write a program that produces these three columns sequence nos. using loop statement Sequence nos. Squared Squared + 5 1 1 6 2 4 9 3 9 14 4 16 21 5 25 30
how to swap 3 nos without using temporary variable
void main() { int k=ret(sizeof(float)); printf("\n here value is %d",++k); } int ret(int ret) { ret += 2.5; return(ret); }
Is it possible to print a name without using commas, double quotes,semi-colons?
int a = 10 + 10 .... ,... A = A * A What would be the value of A? The answer is 120!! Could anyone explain this to me.
2 Answers Bosch, eInfochips, HCL, IHCL,
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
write a c program to Create employee record by taking details like name, employee id, address and phone number. While taking the phone number, take either landline or mobile number. Ensure that the phone numbers of the employee are unique. Also display all the details
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }
main() { show(); } void show() { printf("I'm the greatest"); }
main() { int x=5; clrscr(); for(;x<= 0;x--) { printf("x=%d ", x--); } } a. 5, 3, 1 b. 5, 2, 1, c. 5, 3, 1, -1, 3 d. –3, -1, 1, 3, 5
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