nerdexam
National_Instruments

200-500 · Question #218

You analyze the code of a collegue and see, it uses the function strcasecmp. You try it out to see what it does and use the following function call: strcasecmp('hello my dear!', 'Hello my DEAR!')…

The correct answer is B. The strings are considered equal. See the full explanation below for the reasoning.

Question

You analyze the code of a collegue and see, it uses the function strcasecmp. You try it out to see what it does and use the following function call:

strcasecmp('hello my dear!', 'Hello my DEAR!'); The function call returns "0". What does that mean?

Options

  • AString 1 is less than string 2.
  • BThe strings are considered equal.
  • CString 2 is less than string 1.
  • DThe strings have equal length.

How the community answered

(25 responses)
  • A
    12% (3)
  • B
    76% (19)
  • C
    8% (2)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice