--:--









Quiz for Standard string functions strcmp

Course: C Language | Subject: Unit 5 | Topic: Arrays and Strings



Logo

Q1: What does strcmp() return if both strings are equal?

Logo

Q2: Which header file is required for strcmp()?

Logo

Q3: What is the return value of strcmp("apple", "banana")?

Logo

Q4: What does strcmp() compare?

Logo

Q5: Which of the following is true about strcmp(s1, s2)?

Logo

Q6: What will strcmp("Cat", "Cat") return?

Logo

Q7: What type of function is strcmp()?

Logo

Q8: Which data type is returned by strcmp()?

Logo

Q9: What will strcmp("abc", "ABC") return in ASCII comparison?

Logo

Q10: Which is correct usage of strcmp?

Logo

Q11: If strcmp(s1, s2) returns < 0, it means:

Logo

Q12: Which function is used to compare first n characters?

Logo

Q13: strcmp("abc", "abd") returns?

Logo

Q14: Which is faster: strcmp() or strncmp()?

Logo

Q15: strcmp() stops comparison when:

Logo

Q16: Return value of strcmp("a", "aa")?

Logo

Q17: strcmp() is case-sensitive?

Logo

Q18: If we need case-insensitive compare, use:

Logo

Q19: What happens if we pass NULL to strcmp()?

Logo

Q20: What is complexity of strcmp()?

Are you ready to start test? Set your time limit