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 |
What are disadvantages of C language.
What does a function declared as pascal do differently?
How does #define work?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
What is methods in c?
What is the difference between pure virtual function and virtual function?
What are the types of operators in c?
Differentiate between functions getch() and getche().
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
What is the difference between void main() and void main (void) give example programme?
Where can I get an ansi-compatible lint?