Figure in the int a [100]; To assign a [100] why the line when the scanf enter inside it without & amp; And []
CodePudding user response:
Other format identifier corresponding variables plus & amp; Is to get the address, and the array name itself is address, add brackets, it is not the address, plus & amp; To gild the lily,
CodePudding user response:
The scanf (" % s ", a) as input a string, not a character, because of the character array name was representing the array to store the first address of the string, so you don't have to add the address-of operator & amp; Behind, also need not square brackets [] points out that the array elements are subscript, hope to adopt