src/projects/libc/stdio/putchar.c
int putchar(int ic) {
#ifdef __is_kernel
    char c = (char) ic;
    terminal_write(&c, sizeof(c));
	return ic;
#endif // __is_kernel
#ifdef __is_user
    // TODO: Implement stdio and the write system call.
    return ic;
#endif // __is_user
}
/*
 * Write a character to the terminal.
 *
 * This writes ic (interpreted as character) to the terminal, and returns it.
 */
Write a character to the terminal.
This writes ic (interpreted as character) to the terminal, and returns it.
Write a character to the terminal . This writes ic ( interpreted as character ) to the terminal and returns it .
int putchar(int ic) {
#ifdef __is_kernel
    char c = (char) ic;
    terminal_write(&c, sizeof(c));
	return ic;
#endif 
#ifdef __is_user
    return ic;
#endif 
}
int putchar ( int ic ) { #ifdef __is_kernel char c = ( char ) ic ; terminal_write ( & c , sizeof ( c ) ) ; return ic ; #endif #ifdef __is_user return ic ; #endif }
Write a character to the terminal.
Write a character to the terminal .
// __is_kernel // TODO: Implement stdio and the write system call. // __is_user