MCQOPTIONS
Saved Bookmarks
| 1. |
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» B. find first occurrence of c in char s[ ]. | |