KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am learning about strings in C now. How come to use scanf to get a string you can do scanf("%s",str1); and for printf you can do printf("The string is %s\n", str1); I understand that for scanf it is because the string is just a character array which is a pointer, but for printf, how is it that you can just put the variable name just like you would for an int or float?
Tags (comma-separated)
Save Edits
Cancel