Escape Sequences

Lab C++ Beginner 10 points

Print these two lines exactly (the second starts with a tab):

Path: C:\src\main.cpp
	Say "hi"

Input

None.

Output

Two lines.

Example

Output

Path: C:\src\main.cpp
	Say "hi"
Sample output available
Editor
C++

Hints

\\ is a backslash, \" a quote, \t a tab.

Solution explanation

C++ uses the same escape sequences as C.

Show solution
#include <iostream>
using namespace std;

int main() {
    cout << "Path: C:\\src\\main.cpp\n\tSay \"hi\"\n";
    return 0;
}
Output
Answer
HOME LEARN COMMUNITY DASHBOARD