/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/*  This is an example of btowc(int).  The function determines whether c is a 
    valid (one-byte) character in the initial shift state.
*/
#include <wchar.h>
#include <stdlib.h>

int main() {
    int c;        
    wint_t retval;
    c='r';

    retval = btowc(c);
    if(retval != WEOF) {
    	printf("btowc() = ");
    	fputwc(c, stdout);
    	printf("\n");
    }
    else
        printf("Error\n");
}

