Point out the errors.

Q18. Point out the errors in the following program:

int main()


            cout<<”Enter variable”;



            cout<<”The square is”<<sqrs;


  1. The header file iostream.h has not been included.
  2. The variables var and sqrs have not been declared before using them.
  3. The statements cin>>var and sqrs=var*var have not been terminated by;
  4. The return statement of main() is missing.
  5. The closing bracket ‘}’ is missing.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: