Strings


  1. What will be the output of the following C code?
    #include <stdio.h>
    #include <ctype.h>
    int main()
    {
    int num = 15;
    if (isspace(num))
    {
    printf("Space\n");
    }
    else
    {
    printf("Not Space\n");
    }
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Not Space


  1. What will be the output of the following C code?
    #include <stdio.h>
    #include <ctype.h>
    int main()
    {
    int n = ' ';
    if (isspace(n))
    {
    printf("Space\n");
    }
    else
    {
    printf("Not Space\n");
    }
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Space



  1. Which is true about isaplpha(ch), where ch is an int that can be represented as an unsigned?
    char or EOF.isalpha(ch) returns











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Both 0 if ch is not alphabetic & Non-zero if ch is alphabetic


  1. Which is true about isupper(ch), where ch is an int that can be represented as an unsigned?
    char or EOF.isupper(ch) returns











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Both 0 if ch is not upper case & Non-zero if ch is upper case



  1. Which is true about isalnum(ch), where ch is an int that can be represented as an unsigned?
     char or EOF.isalnum(ch) returns











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Both 0 if not isalpha(ch) or not isdigit(ch) & Non-zero if isalpha(ch) or isdigit(ch)