हिंदी
तमिलनाडु बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान कक्षा ११

Write about strcmp() function. - Computer Science

Advertisements
Advertisements

प्रश्न

Write about strcmp() function.

टिप्पणी लिखिए

उत्तर

The strcmp() function takes two arguments: string1 and string2. It compares the contents of string1 and string2 lexicographically.

The strcmp() function returns a:

  1. A positive value if the first differing character in string1 is greater than the corresponding character in string2. (ASCII values are compared)
  2. Negative value if the first differing character in string1 is less than the corresponding character in string2.
  3. 0 if string1 and string2 are equal.
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 11: Functions - Evaluation - Section - C [पृष्ठ २०५]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
अध्याय 11 Functions
Evaluation - Section - C | Q 3. | पृष्ठ २०५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×