2-c Programming
2-c Programming
https://www.geeksforgeeks.org/escape-sequences-c/
Printf and Scanf
• The printf() function is used in the C programming language to display information on the screen. It’s the all-
purpose “Hey, I want to tell the user something” display-text command. It’s the universal electric crayon for
the C language’s scribbling muscles.
• The scanf() function, which is used to snatch a string of text from the keyboard and save it in the cuddly, warm
paws of a string variable.
• To make scanf() work, you need two things. First, you need a storage place to hold the text you
enter. Second, you need the scanf function itself.
• The storage place is called a string variable. String means a string of characters — text. Variable
means that the string isn’t set — it can be whatever the user types.
• A string variable is a storage place for text in your programs.
Printf and Scanf
Try these
Form of C Program