Tuesday, June 28, 2011

what is printf( "Welcome \n" ); ???



Instructs computer to perform an action
Specifically, prints the string of characters within quotes ( )
Entire line called a statement
All statements must end with a semicolon (;)
Escape character (\)
Indicates that printf should do something out of the ordinary
\n is the newline character
 
Example :
#include <stdio.h>

int main()
{

    printf("Welcome To Huzaifa's Blog\n"); //after executive this line compiler display everything on  a new line
    printf("Good Bye"); // output of this line its on new line

    return 0 ;
}
 
Output: 
 Welcome To Huzaifa's Blog
Good Bye

No comments:

Post a Comment