Strings
- Which of the following function compares 2 strings with case-insensitively?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
strcasecmp(s, t)
- What type of return-type used in String operations?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
void, int and (char *) only
- String operation such as strcat(s, t), strcmp(s, t), strcpy(s, t) and strlen(s) heavily rely upon.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
Presence of NULL character
- Which pre-defined function returns a pointer to the last occurence of a character in a string?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
strrchr(s, c);
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
char s[15] = "INTERVIEW";
char *ptr = strrchr(s, 'R');
printf("%c\n", *(++ptr));
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
V