What value will "strcmp("Astring", "Astring");" return?

  1. A positive value

  2. A negative value

  3. Zero

  4. Compile Error


Correct Option: C

AI Explanation

To answer this question, you need to understand the function strcmp() in C.

The strcmp() function is used to compare two strings in C. It returns an integer value that indicates the relationship between the two strings.

In this case, the strcmp("Astring", "Astring") compares the string "Astring" with itself. Since the two strings are identical, the strcmp() function will return 0.

Therefore, the correct answer is C) Zero.

Find more quizzes: