Study the code:
void show()
main()
{
show();
}
void show (char *s)
{
printf("%sn",s);
}
What will happen if it is compiled & run on an ANSI C
Compiler?
A)It will compile & nothing will be printed when it is
executed
B)it will compile but not link
C)the compiler will generate an error
D)the compiler will generate a warning
Answers were Sorted based on User's Feedback
Answer / manjeet
The compiler will generate an error because the is no ";"
semicolon after the prototype declaration of show function
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / manjeet
Then answer wll be (B) will compile but not link
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / subbu[iit kgp]
if it is assumed that there is a semicolon after the
function prototype declaration of show(), then answer is A.
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / vignesh1988i
according to my compailer it will have an error "function
called incorrectly"
| Is This Answer Correct ? | 0 Yes | 1 No |
Are there any problems with performing mathematical operations on different variable types?
State the difference between realloc and free.
How do I get an accurate error status return from system on ms-dos?
What is the function of this pointer?
0 Answers Agilent, ZS Associates,
What is a nested formula?
What’s the special use of UNIONS?
How can I write a function that takes a format string and a variable number of arguments?
will u please send me the placement papers to my mail???????????????????
Explain command-line arguments in C.
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
a<<1 is equivalent to a) multiplying by 2 b) dividing by 2 c) adding 2 d)none of the above
EXPLAIN #INCLUDE<STDIO.H> EXPLAIN #INCLUDE<CONIO.H>