C Programming - C Preprocessor - Discussion
|
|
|
|
Read more:"Act well your part; there all honor lies."
- Alexander Pope
|
| 4. |
It is necessary that a header files should have a .h extension? |
Answer: Option C
Explanation:
No, the header files have any kind of extension.
|
|
Avkash Agrawal said:
(Sat, May 7, 2011 10:32:36 AM)
|
|
| |
We know that we use many headder file such as
stdio.h, dos.h, conio.h, stdlib.h, graphics.h, iostream.h etc.
So how can you say that there is no need of this extension ? |
|
Atul said:
(Thu, Aug 4, 2011 09:13:37 AM)
|
|
| |
| Can you tell me what are all the other extensions other than .h ? |
|
Manishsoni said:
(Tue, Sep 27, 2011 10:55:00 PM)
|
|
| |
| How can this possible please anyone elaborate it ? |
|
Mani Kandan said:
(Fri, Oct 21, 2011 03:56:00 PM)
|
|
| |
We can define fact.c, filename.c in header file.
So, if you mention filename.c, it will read the entire file. |
|
Sundar said:
(Wed, Jan 25, 2012 05:37:44 PM)
|
|
| |
@ALL
Is is necessary that a header files should have ".h" ?
Answer is NO.
Because the header files can have any extension but it should be included with in C program with same extension.
Let me explain what I did to check this...
In Turbo C directory
C:\Turbo>copy stdio.h stdio.hdr
C:\Turbo>copy conio.h conio.exe
Then I used the line following line to include the header file.
#include<stdio.hdr>
#include<conio.exe>
void main()
{
printf("Welcome to IndiaBIX.com !");
getch();
}
The output : Welcome to IndiaBIX.com ! |
|
Kapil said:
(Fri, Apr 13, 2012 10:48:46 PM)
|
|
| |
| No such header files exist without .h extension. |
|
Moni said:
(Thu, Jul 19, 2012 06:18:57 AM)
|
|
| |
| In c++ it accept without .h extension but in c its possible ? |
|
Lalit Kumawat said:
(Thu, Sep 13, 2012 09:04:07 AM)
|
|
| |
| Without .h extension it is not possible to include the function like printf, scanf etc. |
|
|