Escape Sequences

Lab C Beginner 10 points

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

Path: C:\code\lab.c
	50% "done"

Input

None.

Output

The two lines above.

Example

Output

Path: C:\code\lab.c
	50% "done"
Sample output available
Editor
C

Hints

\\ prints a backslash and \" a quote.

In printf, %% prints a single percent sign.

Solution explanation

Backslash escapes are handled by the compiler; %% is special to printf because % starts a placeholder.

Show solution
#include <stdio.h>

int main() {
    printf("Path: C:\\code\\lab.c\n\t50%% \"done\"\n");
    return 0;
}
Output
Answer
HOME LEARN COMMUNITY DASHBOARD