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



Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",..

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

Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",..

Answer / manjeet

Then answer wll be (B) will compile but not link

Is This Answer Correct ?    1 Yes 1 No

Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",..

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

Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",..

Answer / vignesh1988i

according to my compailer it will have an error "function
called incorrectly"

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

What are disadvantages of C language.

0 Answers   iNautix,


What does a function declared as pascal do differently?

0 Answers  


How does #define work?

0 Answers  


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

0 Answers  


What is methods in c?

0 Answers  






What is the difference between pure virtual function and virtual function?

0 Answers  


What are the types of operators in c?

0 Answers  


Differentiate between functions getch() and getche().

0 Answers  


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

0 Answers   Mindteck,


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

0 Answers  


What is the difference between void main() and void main (void) give example programme?

0 Answers  


Where can I get an ansi-compatible lint?

0 Answers  


Categories