My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Could anyone explain about scanf using &?

Neng Channa's photo
Neng Channa
·Oct 18, 2018

What are the different between string and &string?

char string[20];
scanf( "%s" , string );

However, the following seems to work too,

scanf( "%s" , &string );