This blog is under construction

Sunday 18 March 2012

iswlower

Header file:
    wctype.h

Synopsis:
    int iswlower(wint_t input)

Description:
    Returns non-zero if the given input is a lower case character.  Otherwise it returns 0.



Sample program for iswlower in C:



  #include <stdio.h>
  #include <wchar.h>
  #include <wctype.h>
  int main() {
        wint_t wide_char;
        char input;
        printf("Enter your input:");
        input = getchar();

        /* mbtowc -converts single byte to wide character format */
        wide_char = btowc(input);

        if (iswlower(wide_char))
                printf("It is a lower case  character\n");
        else
                printf("It is not a lower case character\n");

        printf("Return value: %d\n", iswlower(wide_char));
        return 0;
  }



  Output:
  Enter your input:a
  It is a lower case  character
  Return value: 512

No comments:

Post a Comment