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

Write a function to find the area of a triangle whose length of three sides is given

2 Answers  


Table of Sudoku n*n

0 Answers  


What is typeof in c?

0 Answers  


What the different types of arrays in c?

0 Answers  


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??

4 Answers  


What is difference between array and pointer in c?

0 Answers  


How the c program is executed?

0 Answers  


Write a c code segment using a for loop that calculates and prints the sum of the even integers from 2 to 30, inclusive?

4 Answers  


Explain the concept of "dangling pointers" in C.

2 Answers  


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?

1 Answers  


main is a predefined or user define function if user defined why? if predefined whay?

12 Answers   TCS,


Categories