Basic Syntax


  1. Choose the correct formatted code.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Variable initialisation should be done in this format int num = 10;.


  1. Choose the correct formatted code.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    If a long line that is broken into pieces is broken with an operator, the operator should be placed at the end of the line, not the start of the next line.



  1. What can be improved by formatting the source code?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    By formatting your code, the user can easily understand it and can upgrade it without any complexity.


  1. How many number of spaces should be set in default tab?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    The default number of spaces is 4 in programming.



  1. Which is used for formatting purpose in c++?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Whitespace is a term that refers to characters like spaces, tabs, and newlines that are used for formatting purposes.