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 |
Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i); } a. 20, 10, 20, 10 b. 20, 9, 20, 10 c. 20, 9, 19, 10 d. 19, 9, 20, 10
There is a lucky draw held every day. if there is a winning number eg 1876,then all possible numbers like 1867,1687,1768 etc are the numbers that match irrespective of the position of the digit. Thus all these numbers qualify fr the lucky draw prize Assume there is no zero digit in any numbers. write a program to show all the possible winning numbers if a "winning number"is passed as an arguments to the function.
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
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
void func1(int (*a)[10]) { printf("Ok it works"); } void func2(int a[][10]) { printf("Will this work?"); } main() { int a[10][10]; func1(a); func2(a); } a. Ok it works b. Will this work? c. Ok it worksWill this work? d. None of the above
Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique.
5 Answers IITR, Microsoft, Nike,
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }
Write a procedure to implement highlight as a blinking operation
main() { char *p = “ayqm”; char c; c = ++*p++; printf(“%c”,c); }
What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }