Discussion
Which of the following function compares 2 strings with case-insensitively?
Answer: C
Correct answer: strcasecmp(s, t)
strcasecmp compares two strings ignoring the difference between upper and lower case. It is a POSIX function rather than a standard C one - the Microsoft spelling is _stricmp - but it is available almost everywhere. strcmp compares by character code, so "abc" and "ABC" come out unequal.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development