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 |
how to swap 3 nos without using temporary variable
main() { printf("%x",-1<<4); }
Give a one-line C expression to test whether a number is a power of 2.
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.
How we print the table of 3 using for loop in c programing?
Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all.
2 Answers Mentor Graphics, Microsoft,
Is the following code legal? typedef struct a { int x; aType *b; }aType
Is the following code legal? struct a { int x; struct a *b; }
main() { char a[4]="HELL"; printf("%s",a); }
Which version do you prefer of the following two, 1) printf(ā%sā,str); // or the more curt one 2) printf(str);
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
const int perplexed = 2; #define perplexed 3 main() { #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed); } a. 0 b. 2 c. 4 d. none of the above