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 |
main() { char * strA; char * strB = I am OK; memcpy( strA, strB, 6); } a. Runtime error. b. I am OK c. Compile error d. I am O
how to check whether a linked list is circular.
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.
C statement to copy a string without using loop and library function..
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }
main() { extern int i; i=20; printf("%d",i); }
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number
main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?
respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"
#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?