Home > Back-end >  What should this change, strives for the bosses take
What should this change, strives for the bosses take

Time:11-13

CodePudding user response:

The scanf for STR have problems in

 the scanf (" % s % d ", STR, & amp; A); 


STRCMP first parameter should be STR instead of STR [10]

I need to review the array, array, array first address, and so on, has the type of the parameters of the function call

CodePudding user response:

The
reference 1/f, confident boy reply:

the scanf for STR has the problem
 the scanf (" % s % d ", STR, & amp; A); 


STRCMP first parameter should be STR instead of STR [10]

I need to review the array, array, array first address, and so on, has the type of the parameters of the function call

By now, thank you very much *? (????? )? *??

CodePudding user response:

The scanf (" % s % d ", & amp; STR [10], & amp; A); To the scanf (" % s % d ", STR, & amp; A);//STR array name is the string first address, & amp; STR [10] is the address of the elements of the subscript for 10, an array (array subscript only to 9)
STRCMP (STR [10], "triange") to STRCMP (STR, "triange");//STR [10] is an element (only one character, not a string, the string is ok) with an array name


  • Related