Ask your own question, for FREE!
MIT 6.002 Circuits and Electronics, Spring 2007 16 Online
OpenStudy (anonymous):

regarding c programming is semicolon used after function name is declared and why?

OpenStudy (anonymous):

There are 3 points to be followed for a function in order.Declaration,Definition and Execution.Since C follows a top down approach,so u need to first declare the function in an exact form as when u define it.This is merely a statement which tells the compiler that it is going to encounter this function in the following statements of the program.This declaration statement is known as Prototype Declaration.Since in C statements are followed by semicolon.Hence,it is used..If you don't want to declare the function separately,just define it before the function which calls this particular function..In that case u should not put the semicolon,since that would be the definition of the function...

OpenStudy (anonymous):

Semicolon simply indicates the end of the statement .... by defining a prototype you would tell the compiler of the existence of the function before calling it.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!