
Learn core concepts, essential formulas, and attempt practice questions designed on the latest TCS NQT testing patterns.
What is the output of strlen("TCS\0NQT")?
Correct Answer: A) 3
Step-by-step Solution: strlen reads until the first null terminator ('\0'). In 'TCS\0NQT', it stops after 'TCS', returning 3.
What does strcmp("abc", "abc") return?
Correct Answer: A) 0
Step-by-step Solution: strcmp returns 0 if the two strings are equal.
Remember that string lengths exclude the terminating null character ('\0').