Examveda
Examveda

What will the following C code do?
char * strrchr(const char *s, int c )
char ch = c;
char *sc;
for(sc = NULL; ; ++s)
if(*s == ch)
SC = 9;
i f (*s =='\O' )
return (( char *) s);

A. find last occurrence of c in char s[ ].

B. find first occurrence of c in char s[ ].

C. find the current location of c in char s[ ].

D. There is error in the given code

Answer: Option A


This Question Belongs to C Program >> Arrays And Strings

Join The Discussion

Related Questions on Arrays and Strings