Sample and understanding

                                                 




Program to print "Hello world".                                                                             Output Of Program




Explanation of Program : 


  • The #include<stdio.h> is a preprocessor command. This command tells the compiler to include the contents of stdio.h (standard input and output) file in the program.
    The stdio.h file contains functions such as scanf()  and printf() to take input and display output respectively.
    If you use printf() function without #include<stdio.h> writing the program will not be compiled.
  • The execution of a C program starts from the main() function.
  • The printf() is a library function to send formatted output to the screen. In this program, the printf() displays  Hello world text on the screen.
  • The return 0; statement is the "Exit status" of the program. In simple terms, the program ends with this statement.

Use O \n in Printf() function :  

  • normaly \n is use to print next word in new line.
  • Like, if we put in bracket (hello \n world); , 'hello' word will print in first-line and 'world' word will print in the second new line.

Comments

Popular posts from this blog

Getting input in C

Unary Operator