IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C++ Programming C# Programming Java Programming
Microbiology Biochemistry Biotechnology Biochemical Engineering
Civil Engineering Mechanical Engineering Chemical Engineering Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

C Programming - C Preprocessor - Discussion

@ : Home > C Programming > C Preprocessor > Yes / No Questions - Discussion

4. 

It is necessary that a header files should have a .h extension?

[A]. Yes[B]. No

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.

Write your comments here:
Name *:     Email:


© 2008-2013 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Contact us: info@indiabix.com     Follow us on twitter!