Can we include a header file in another header file?

Showing Answers 1 - 3 of 3 Answers

baseersd

  • Sep 17th, 2007
 

Ya. You can include header file in another file.

//In test.h
#include<stdio.h>

//In test.c
#include "test.h"
int main()
{
printf("Hellon");
}


Here stdio.h header file is included in another header file test.h

The only thing to remember is to  include the file before it is used.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions