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 |
Write a function to find the area of a triangle whose length of three sides is given
Table of Sudoku n*n
What is typeof in c?
What the different types of arrays in c?
Is there any restriction in how many arguments printf or scanf function can take? in which file in my c++ compiler i can see the code for implementation of these two functions??
What is difference between array and pointer in c?
How the c program is executed?
Write a c code segment using a for loop that calculates and prints the sum of the even integers from 2 to 30, inclusive?
Explain the concept of "dangling pointers" in C.
Difference between data structure and data base.
7 Answers CTS, Value Labs, Zoho,
What does the message "warning: macro replacement within a string literal" mean?
main is a predefined or user define function if user defined why? if predefined whay?