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 |
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
Explain modulus operator.
write a program that print itself even if the source file is deleted?
what r the cpu registers r ther?
Who developed c language?
What is #include conio h?
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
#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?
Can we declare function inside main?
Difference between pass by reference and pass by value?
What is header file definition?
Write a program to remove the C comments(/* */) and C++ comments(//) from a file. The file should be declared in command line.