answersLogoWhite

0

Yes,we can compile our program without header file without any error,but we can not use any predefine functions like printf,scanf.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

What is the command to compile a java program named Greetingsjava?

The command to compile a Java program is "javac", followed by the class name (file name).


How is a library file incorporated in a C program?

Every library requires a header file (.h file) that can be included in any translation unit that requires access to the library. The header describes the library interface. The library implementation may be provided by a corresponding .c source file in which case you can compile the library into your program just as you would any other translation unit. However, most library implementations are provided by a precompiled library file (.lib file) and you generally won't have access to the source file. The precompiled library file is required by the linker while the corresponding header is required by the compiler.


C program without main functoin?

If we save our program with .c extention before compiling it, the compiler with automatically include the header files. for eg-First we save our program with sum.c and then compile it. It will not show any error.1. Compilation needs header files, not execution.2. Very small example programs can be written without using any header file, eg:/* mini.c */extern void (const char *puts);int main (void){puts ("Hello, world");return 0;}


How do you install the header file 2DArray.h in c library?

To install the header file 2DArray.h in a C library, first, ensure the file is placed in the appropriate directory for your project, typically within the include directory for headers. You can then include it in your C source files using the preprocessor directive #include "2DArray.h". If you're using a build system, ensure that the include path is correctly configured to locate the header file during compilation. Finally, compile your code, ensuring that the C compiler can find the header file.


What is the different between header file and header pointer?

Header file is a file which is meant to be included into another file during compilation. Examples: string.h, stdio.h, inttypes.h. Header pointer is a pointer to an object called header (for example header of a linked list).

Related Questions

How can you create a c program without using header file?

C programs do not require header files. If you want a C program without header files, you can simply not create them. However, you may or may not be able to include your non-header file source files.


What is the command to compile a java program named Greetingsjava?

The command to compile a Java program is "javac", followed by the class name (file name).


How is a library file incorporated in a C program?

Every library requires a header file (.h file) that can be included in any translation unit that requires access to the library. The header describes the library interface. The library implementation may be provided by a corresponding .c source file in which case you can compile the library into your program just as you would any other translation unit. However, most library implementations are provided by a precompiled library file (.lib file) and you generally won't have access to the source file. The precompiled library file is required by the linker while the corresponding header is required by the compiler.


Any program in c plus plus without using any header file?

For example: int main (void) { return 0; }


How is the header file include within a program?

#include or#include "nameoftheader"


C program without main functoin?

If we save our program with .c extention before compiling it, the compiler with automatically include the header files. for eg-First we save our program with sum.c and then compile it. It will not show any error.1. Compilation needs header files, not execution.2. Very small example programs can be written without using any header file, eg:/* mini.c */extern void (const char *puts);int main (void){puts ("Hello, world");return 0;}


Is header file the library file?

No. Header files are those which contains declaration part of function & library files are those which contains definition part of function. These are those functions which we called in our program by using header files.


How to write a C program to find the header record in a file .please advice?

Just open the file, read-in N bytes and then examine (parse) for known header values or signature.


How do you install the header file 2DArray.h in c library?

To install the header file 2DArray.h in a C library, first, ensure the file is placed in the appropriate directory for your project, typically within the include directory for headers. You can then include it in your C source files using the preprocessor directive #include "2DArray.h". If you're using a build system, ensure that the include path is correctly configured to locate the header file during compilation. Finally, compile your code, ensuring that the C compiler can find the header file.


How do you include classes and structures in header files in c plus plus?

Classes and structures can be put in a header file the same way you would use them in a main program; the only difference is that they are placed in a separate file, called a header file. Then, after creating a new file, include that new file with the definition by the use of the preprocessor #include statement.


What are the file created after c file is save?

Having saved the source file (*.C), you can compile it into an object module (*.OBJ), then link an executable program (*.EXE)


Difference between header file and library file?

A header file is normally used for declarations to provide an interface that can be included into a source file that wants to use the functions/variables that have been declared. If the header file contains function prototypes, it will usually have a corresponding source file that defines the functions. /* example.h */ #define bTRUE 1 #define bFALSE 0 typedef int BOOL BOOL bEvenNumber(unsigned int uiNumber); /* example.c */ #include "example.h" BOOL bEvenNumber( unsigned int uiNumber) { return (uiNumber & 1) ? bFALSE : bTRUE; }