c/c++/c# site : www.cprogramming.com

souleman:


yes it works perfectly

but int main() should be prefered over void main() coz it will return a value back to the OS/parent program from where it was called. this indicates wether it was successful or not according to the return value.

void() is normally used for functions. though in small/basic programs there is no harm in using void main()