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

4.A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above

6 Answers   Accenture,


Explain modulus operator.

0 Answers  


write a program that print itself even if the source file is deleted?

2 Answers  


what r the cpu registers r ther?

1 Answers  


Who developed c language?

0 Answers  






What is #include conio h?

0 Answers  


how do u find out the number of 1's in the binary representation of a decimal number without converting it into binary(i mean without dividing by 2 and finding out the remainder)? three lines of c code s there it seems...can anyone help

5 Answers  


#include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); } what is the output for this?

4 Answers   IIIT,


Can we declare function inside main?

0 Answers  


Difference between pass by reference and pass by value?

0 Answers   TCS, TISL,


What is header file definition?

0 Answers  


Write a program to remove the C comments(/* */) and C++ comments(//) from a file. The file should be declared in command line.

4 Answers   Persistent, Subex,


Categories