Exercises C++ Syntax

List of Exercises in C++ Syntax

Exercise 1

Insert the missing part of the code below to display "Hello World!":



Exercise 2

 By using a special character, insert a new line after "Hello World":



 Exercise 3

Insert the missing parts, Comments in C++ are written with special characters:



Comments

  1. Exercise 1
    Insert the missing part of the code below to display "Hello World!":
    cout<<"Hello world!";
    return 0;
    }
    Exercise 2
    By using a special character, insert a new line after "Hello World":
    cout << "Hello World! \n";
    cout << "I am learning C++";
    return 0;
    }
    Exercise 3 Insert the missing parts, Comments in C++ are written with special characters. Insert the missing parts:
    / This is a single-l i ne comment
    /This is a muti-l i ne comment *

    ReplyDelete
    Replies
    1. Ex3: It should be /*This is a single-l i ne comment
      *This is a muti-l i ne comment*/
      Thanks!!!

      Delete

Post a Comment

Popular posts from this blog

ភាសាកម្មវិធី C++៖ អថេរ ឬអញ្ញាតិ