answersLogoWhite

0

Where do we write main function in a c program?

Updated: 8/19/2019
User Avatar

Wiki User

12y ago

Best Answer

Into the source program.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Where do we write main function in a c program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a programm in c plus plus without using function main?

I don't think its possible. Every C++ program must at least have the main function.


Write a program in C without any functions?

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()


What must every c program have?

A main function must be present in every C program.


What is main function used in c?

if you do not used main function in c program when errors are accrued


How you write a c program for making a call in gcc?

int main() { // Call the printf function printf("This is a function call!\n"); return 0; }


What is the only function all C plus plus programs must contain?

Every C plus plus program that is a main program must have the function 'main'.


What function does every C program have Why should you split large programs into several functions?

Every C program has a main() function.


C program always begins with which function?

That's up to you, but the execution of the program begins with function main.


Can you write a program without main in c?

Certainly, you can write a program without main, but you cannot build an executable from it, if that is okay with you.


Why you use main function in c?

Because if you donot use main function in c program, the compiler willnot execute the program.C compiler starts execution from main function itself.


How do you write a c program without using main function?

You cannot create a program with the extension .exe without the function main. You can create a dll which does not even use main. WinApi uses another main function but it's still a main function. Main function is entry point for your program, no entry point no program.Write a progrmme in c with out using a main function. #include #define decode(s,t,u,m,p,e,d)m##s##u##t #define begin decode(a,n,i,m,a,t,e) int begin() { printf("HELLO") }


What is the meaning of statement missing in function main in c language?

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.