Q:

Fatal Error: stio.h: No such file or directory in C

belongs to collection: C Common Errors Programs

0

Fatal Error: stio.h: No such file or directory in C

stio.h is not a valid header file in C programming language, when you write the program, sometimes, we may forget to write the header file name correctly - in that case such fatal error is occurred.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Example:

#include <stio.h>

int main(void){
	printf("Hello world");
	return 0;
}

Output

prog.c:1:18: fatal error: stio.h: No such file or directory
 #include <stio.h>
                  ^
compilation terminated.

How to fix?

See the header fie inclusion section, I wrote #include <stio.h> instead of #include <stdio.h>, to fix this or such errors, we should use correct header file names.

Correct code:

#include <stdio.h>

int main(void){
	printf("Hello world");
	return 0;
}

Output

Hello world

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Error: Invalid escape sequence in C | Common C pro... >>
<< Error: expected declaration or statement at end of...