Strings


  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. 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 will be the value of var for the following C statement?
    var = strcmp("Hello", "World");











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    -1


  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



  1. Which of the following library function is not case-sensitive?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    isdigit()