What is the function of header files?

what does it mean by #include and using namespace std; ??? what is the purpose of cutly brackets ? what if we don’t write return 0 at the end of prg? can we replace these syntax?

iostream is a file that has all the things like cout, endl and etc is defined. If we need to use them we need to add that file. So basically #include means copying and pasting the code in that file to your code.

#include < iostream >
using namespace std;

are used. It is because computer needs to know the code for the cout, cin functionalities and it needs to know which namespace they are defined.

If this namespace is not used, then computer finds for the cout, cin and endl etc… Computer cannot identify those and therefore it throws errors.

now 2nd question
what is the purpose of cutly brackets ?
it defines the block of code
it defines the scope of variables define within
basically it is part of syntax

question 3

nothing will happen it is just the return statement
o is used to show that compilation executed sucessfully