Question:

What is return value of strcmp() if the two parameters are identical?

Show Hint

Use strcmp return value for exact string match: 0 means identical strings.
Updated On: June 02, 2025
  • -1
  • 1
  • 0
  • True
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

strcmp() returns:
- 0 if both strings are equal
- negative value if first<second
- positive value if first>second
Was this answer helpful?
0
0

Top Questions on Programming and Data Structures

View More Questions

TS PGECET Notification