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

code for quick sort?

0 Answers  


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

0 Answers  


Rapunzel walks into the forest of forgetfullness. She meets a Lion who lies on Monday Tuesdays and Wednesdays and meets a rabbit who lies on Thurs fridays and saturdays . On that day both say that "I lied yesterday". What day is it .

3 Answers   TCS,


Which of the following data structures is on average the fastest for retrieving data: 1) Binary Tree 2) Hash Table 3) Stack

3 Answers  


What are multidimensional arrays?

0 Answers  






How to write c functions that modify head pointer of a linked list?

0 Answers  


What is the data segment that is followed by c?

0 Answers  


WHAT IS HEADER?

8 Answers   ProKarma, TCS,


how to impliment 2 or more stacks in a single dimensional array ?

1 Answers   iFlex, Microsoft,


cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

0 Answers  


What’s a signal? Explain what do I use signals for?

0 Answers  


What is || operator and how does it function in a program?

0 Answers  


Categories