hi,
can anyone please tell me which is better in #include<stdio.h> and #include"stdio.h" and why?

bye
chandra

Recommended Answers

All 2 Replies

#include "name.h" the compiler looks first in the current directory.
#include <name.h> the compiler looks in the default path where the libraries for it are installed.

When the programmer do not want to mix header files own made with the standards that came with the compiler, usually it sets them between "..." to tell the compiler to look in the current directory.

at this point in your programming career, you should always use

#include <stdio.h>

the only time you should use

#include "myHeader.h"

is when you wrote that file (or someone gave it to you), and you saved it to the same directory as your C file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.