Syntax :
- Way 1 : Messaging
printf (" Type your Message / Instruction " ) ;
- Way 2 : Display String
printf ("Name of Person is %s ", name ) ;
Notes or Facts :
- printf is included in header file "stdio.h"
- As name suggest it used for Printing or Displaying Messages or Instructions
Uses :
- Printing Message
- Ask user for entering the data ( Labels . Instructions )
- Printing Results
Live Example :
#include< stdio.h>
#include< conio.h>
void main()
{
char str[10];
printf("Enter the String : ");
scanf("%s",str); // Accept String
printf("String is : %s ",str);
getch();
}
Output :Related Articles :Enter the String : Pritesh String is : Pritesh
- How to Input Password in C : Validation of User name
- Putchar function >> Displaying String in C
- Puts >> Displaying String in C Programming
- Printf >> Displaying String in C Programming



0 Comments:
Post a Comment
Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email