Hello,world! Part 2
COURSES CODE PLAYGROUND DISCUSS TOP LEARNERS Hello, World! 10 2/2 Hello World! The printf function is used to generate output: #include <stdio.h> int main() { printf ("Hello, World!\n"); return 0; } Try It Yourself Here, we pass the text "Hello World!" to it. The \n escape sequence outputs a newline character . Escape sequences always begin with a backslash \. The semicolon ; indicates the end of the statement. Each statement must end with a semicolon. return 0; This statement terminates the main() function and returns the value 0 to the calling process. The number 0 generally means that our program has successfully executed. Any other number indicates that the program has failed. Tap Try It Yourself to play around with the code.