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;
}
You need one, and only one, main function in every C program. This is the entry point following library initialization. There can be no C program without a main function, unless you want to replace the run-time library - not a good idea.
You can compile it without difficulty, but cannot link it into an executable (still you can link a library).
You can't. Somewhere there must be a main() method, which is the program entry point. It may be the case that the main method is in a separate file somewhere that is included as a reference.
There are no output statements in C. Anyway, here is an example:
int main (void) { return 0; }
Not possible.
A main function must be present in every C program.
It depends on what you mean by 'types class'. Here is the shortest C program, without any 'types class': int main (void) { return 0; }
No you can't. main() is the entry point of a C program where execution starts. Only a single main() can exist in a C program. A program with 2 mains wil not even compile successfully.
Every C plus plus program that is a main program must have the function 'main'.
Every C program must have a function, named main(), which is where the program starts execution. If there is no function main(), the computer does not know where to start running the program. The function main() must also do something; if it is just empty, some smarter compilers will note that there is nothing for the program to do, and will give this sort of error message to indicate that you forgot to tell the program what to do.
Certainly, you can write a program without main, but you cannot build an executable from it, if that is okay with you.
Every program requires an entry point. Main() provides the entry point in C.
int main () {}
yes a C program can work without a main() function. Though its not the normal C code that you would be writing on ur gcc or turbo C compiler. for example Linux Source code ... does not have a main() function : for details u can visit: http://samarthonweb.blogspot.com/2009/08/c-programe-with-no-main-function.html
This question cannot be answered without seeing the source program.
main() { if(printf("%c",59)) }
I don't think its possible. Every C++ program must at least have the main function.
Yes. Windows GUI application are the tipical examples, their execution starts with 'WinMain', not 'main'
It is not possible. In C, any program must have at least one function to be able to compile and execute properly: the function main()
A main function must be present in every C program.
You might, with the help of your linker program (renaming external symbols and stuff like that), but it would be absolutely pointless.
With special linker-options (platform-dependent) you might be able to create a program that has function 'Start' (for example), instead of 'main', but I don't see any reason in it.