putch Function

Put a character to stdout.

Include

<stdio.h>

Prototype

void putch(char c);

Argument

c
the character to be written

Remarks

The putch() function is provided as an empty stub which can be completed as required by the project. It must be defined if you intend to use the printf() function. Typically this function will send its argument to a peripheral that you intend to associate with stdout.

Example

#include <stdio.h>

const char * x = "This is a string";

int main(void)
{
  const char * cp;

  cp = x;
  while(*cp)
    putch(*cp++);
  putch(’\n’);
}

Example Output

This is a string