セクション 3. 章 4
single
Challenge: Comparing Strings
メニューを表示するにはスワイプしてください
After learning how to compare strings in C using standard library functions, you are ready to apply these concepts in a practical scenario. Comparing strings is a common operation, whether you are checking for equality or determining which string comes first in dictionary order. This challenge will reinforce your understanding and help you interpret the results of string comparison functions.
タスク
スワイプしてコーディングを開始
Practice using string comparison functions in C by implementing a function that checks if two strings are equal, or determines which one is lexicographically greater.
- Use a string comparison function to compare
str1andstr2. - If the strings are equal, return
0. - If
str1is lexicographically less thanstr2, return-1. - If
str1is lexicographically greater thanstr2, return1.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 3. 章 4
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください