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 print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.
19 Answers Cap Gemini, Infosys,
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit >> (i - (i -1))); } } a. 512, 256, 0, 0, 0 b. 256, 256, 0, 0, 0 c. 512, 512, 512, 512, 512 d. 256, 256, 256, 256, 256
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
print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!
35 Answers Tata Elxsi, TCS, VI eTrans,
#include<stdio.h> #include<conio.h> void main() { int a=(1,2,3,(1,2,3,4); switch(a) { printf("ans:"); case 1: printf("1");break; case 2: printf("2");break; case 3: printf("1");break; case 4: printf("4");break; printf("end"); } getch(); }
How we print the table of 2 using for loop in c programing?
main() { main(); }
main() { int i=5,j=6,z; printf("%d",i+++j); }
Sir... please give some important coding questions asked by product companies..
Write a program to receive an integer and find its octal equivalent?
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..
Write a function to find the depth of a binary tree.
13 Answers Adobe, Amazon, EFI, Imagination Technologies,