Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

valid include formats in C ?

Status
Not open for further replies.

john2020

Full Member level 5
Full Member level 5
Joined
Nov 13, 2005
Messages
292
Helped
12
Reputation
24
Reaction score
8
Trophy points
1,298
Activity points
4,911
hi

pls help me answer this question,asked for interview
Which of the following are valid include formats?

#include (file.h) and #include "file.h"

#include <file.h> and #include "file.h"

#include (file.h) and #include <file.h>

#include <file.h> and #include [file.h]

#include [file.h] and #include "file.h"
 

these are valid expressions:
#include <file.h> and #include "file.h"
where
<file.h> file.h is located in the compiler's include directory
"file.h" file.h is located in the local work (your source files) directory


Mik
 
#include <file.h> and #include "file.h"

the first one is that this header file is located in the "default" directory of your IDE or compiler the lastone is that you want to include a headerfile that is attached to the project you are currently building (or in the same directory as the .c file.

I hope this helps you out.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top