#include
void main()
{
static int x;
if (x++ < 2)
main();
}
Answers
Answered by
1
compile error
correct your program syntax
# include<iostream.h>
# include<conio.h>
and not use of printing element cout so no output
correct your program syntax
# include<iostream.h>
# include<conio.h>
and not use of printing element cout so no output
Answered by
0
Answer:
The output of the given piece of C code is given as a Compile time error as:
error: #include expects "FILENAME"
Explanation:
- In the C programming language, the #include directive tells the pre-processor to insert the contents of another file into the source code where the #include directive is placed/found. #Include directives are typically used to include header files for C functions that are stored outside the current source file.
- The syntax of the #include directive in the C language is as follows:
#Include<header> or #include "header" - The name of the header file to include is placed inside the braces or quotes. Header files are C files, usually ending in ".h" and containing declarations and macro definitions that can be shared across multiple source files.
- The difference between these two constructs is subtle but important. If the header file is contained in <>, the pre-processor will search the given directory path to find the header file. If the header file is enclosed in "", the pre-processor looks for the header file in the same directory as the source file.
Correct Question:
The given question is incorrect and the correct one for the same is given below:
Find the error in the following:
#include
void main()
{
static int x;
if (x++ < 2)
main();
}
Similar questions