1.

What function must all c programs have

Answer»

navigationPROGRAMMINGCTHE IMPORTANCE OF THE MAIN() FUNCTION IN C PROGRAMMINGTHE IMPORTANCE OF THE MAIN() FUNCTION IN C PROGRAMMINGRELATED BOOKC All-in-One Desk Reference For DummiesBy DAN GookinAll C language programs must have a main()function. It’s the core of every program. It’s required. The main() function doesn’t really have to do anything other than be PRESENT inside your C source code. Eventually, it contains instructions that tell the computer to carry out WHATEVER task your program is DESIGNED to do. But it’s not officially required to do anything.THE BASIC MAIN() FUNCTIONWhen the operating system runs a program in C, it passes control of the computer over to that program. This is like the captain of a huge ocean liner handing you the wheel. Aside from any fears that may induce, the key point is that the operating system needs to know where inside your program the control needs to be passed. In the case of a C language program, it’s the main() function that the operating system is looking for.At a minimum, the main() function looks like



Discussion

No Comment Found