Strings


  1. Which of the following function compares 2 strings with case-insensitively?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    strcasecmp(s, t)


  1. What type of return-type used in String operations?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    void, int and (char *) only



  1. String operation such as strcat(s, t), strcmp(s, t), strcpy(s, t) and strlen(s) heavily rely upon.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Presence of NULL character


  1. Which pre-defined function returns a pointer to the last occurence of a character in a string?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    strrchr(s, c);



  1. 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));
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    V