0

Main()

Why do we use () after main in all the programs?

6th May 2019, 4:47 PM
Vinay24
2 Respostas
0
Main is a function,every function takes in or doesn't take in parameters using ().It's mandatory to use () after every function declaration otherwise it would be treated as a normal variable.
6th May 2019, 4:52 PM
Mensch
Mensch - avatar
+ 2
() is a placeholder for arguments provided to a function. I found that you havent started any course yet. You will find about declaring functions, parameters in future. So just stick with what you have learned now and in future you will learn more about it https://www.sololearn.com/learn/CPlusPlus/1635/?ref=app https://www.sololearn.com/learn/C/2911/?ref=app
6th May 2019, 4:56 PM
Seniru
Seniru - avatar