Vidyalelo
C Programming · Q96

Arrays and Strings

Programming · C Programming · question 96

Q96

What will be the output of the following C code? const char str1[] = "abcdef"; const char str2[] = "fgha"; char *mat; mat= strpbrk(str1, str2); if(mat) printf("First matching character: %c ", *mat); else printf("Character not found");

A.
g
B.
a
Answer
C.
h
D.
f

Answer: Option B

Solution

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