Home » C++ Programming » Basic Syntax » Question
  1. Choose the correct formatted code.
    1. int main()
      {
      cout << 10;}
    2. int main(){
      cout << “10”}
    3. int main()
      {
      cout << “10”;
      }
    4. All of above
    5. None of these
Correct Option: C

The braces that tell where a function begins and ends should be aligned with the function name and be on their own lines.



Your comments will be displayed only after manual approval.