Printf() function


Print() function

  1. The printf function is used to display output on the monitor
  2. It can display text, constants, values of variables or expressions on monitor in specified format

Syntax

printf(Format String, argument_list);

Format String

  • Also called control string.
  • Given in double quotes.

·        May consist of the following:

  • Text
  • Format specifiers
  • Escape sequences


Argument list

·        Consists of constants, variables or expressions whose values are to be printed on the screen

  1. Separated by comma.
  2. Use of argument list is optional
                                                       

#include<stdio.h>    
int main(){    
printf("Wellcome to MsCube Tech ");    
return 0;  
}  
 

Output 

 Wellcome to MsCube Tech




 

Post a Comment

0 Comments

Close Menu