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 |
read an array and search an element
What is the size of enum in bytes?
what is difference between strcmp & palindrome?
Why main is used in c?
#define MAX 3 main() { printf("MAX = %d \n",MAX ); #undef MAX #ifdef MAX printf("Vector Instituteā); #endif
Is double link list a linear data structure? If Yes, Why?If No, Why?
what is dangling pointer?
#include <stdio.h> int main() { if ("X" <"x") printf("X smaller than x "); } my question is whats the mistake in this program? find it and please tell me..
Heyyy All, Just a challenge . A C program with if Else if(){ /// insert sumthing print ("in if") // insert sumting } else { ///// insert sumthing print ("in else"); //// insert sumthing } can anyone modify it so that program prints. if and else both
Write a C program to convert an integer into a binary string?
What is the memory allocated by the following definition ? int (*x)[10];
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory