You are on page 1of 3

WARM UP (From Phạm Nguyên Khang course)

 Read Carefully Before Start Quizzes

 Only print required things


 Generally, you SHOULD NOT use printf() before scanf().
 You MUST NOT use Non ANSI C libraries (e.g: conio.h)
 The template of main() function is

int main() {
//Your code goes here

return 0;
}

You SHOULD NOT use:

void main() {
//Your code goes here

return 0;
}

 Function printf()

 print something into the screen in format, ex:

printf("Hello, world");

print Hello, world

printf("Hello, world\n");

print Hello, world and newline

printf("Peter said: \"Hello\"");

print Perter said: "Hello"

printf("This is \\ character.");

print This is \ character

Some special characters:

 \b: Backspace
 \n: newline
 \t: Tab
 \\: \
 \': '
 \": "
 \nnn: the character whose ASCII code is nnn in decimal
 \xhh: the character whose ASCII code is hh in hexadecimal
WARM UP (From Phạm Nguyên Khang course)

 Read Carefully Before Start Quizzes

 Only print required things


 Generally, you SHOULD NOT use printf() before scanf().
 You MUST NOT use Non ANSI C libraries (e.g: conio.h)
 The template of main() function is

int main() {
//Your code goes here

return 0;
}

You SHOULD NOT use:

void main() {
//Your code goes here

return 0;
}

 Function printf()

 print something into the screen in format, ex:

printf("Hello, world");

print Hello, world

printf("Hello, world\n");

print Hello, world and newline

printf("Peter said: \"Hello\"");

print Perter said: "Hello"

printf("This is \\ character.");

print This is \ character

Some special characters:


 \b: Backspace
 \n: newline
 \t: Tab
 \\: \
 \': '
 \": "
 \nnn: the character whose ASCII code is nnn in decimal
 \xhh: the character whose ASCII code is hh in hexadecimal

You might also like