Vidyalelo
C Programming · Q115

Arrays and Strings

Programming · C Programming · question 115

Q115

What will be the output of the following C code? const char str1[]="ABCDEF1234567"; const char str2[] = "269"; len = strcspn(str1, str2); printf("First matching character is at %d ", len + 1);

A.
First matching character is at 8
Answer
B.
First matching character is at 7
C.
First matching character is at 9
D.
First matching character is at 12

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board