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 |
How will you divide two numbers in a MACRO?
write a c program to print "Welcome" without using semicolon in the whole program ??
How do I initialize a pointer to a function?
Who developed c language and when?
What is difference between union All statement and Union?
Give the Output : * * * * * * * * * *
what is diff between localstatic and globalstatis variable possible 2 use in another file...?
how to execute a program using if else condition and the output should enter number and the number is odd only...
Why is structure padding done in c?
void main(int argc,char *argv[],char *env[]) { int i; for(i=1;i<argc;i++) printf("%s",env[i]); }
wt is diference between int and int pointer as same as float and float pointer and char and char pointer
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent