[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


putchar

Write a character to stdout.

Compatibility:

This function is compatible with the following targets:

ANSI

BeOS

EMB/RTOS

Mac OS

Palm OS

Win32


Prototype:
#include <stdio.h>
int putchar(int c);
Parameters:

Parameters for this facility are:

c  
int  
The character to write to a stdout  

Remarks:

The putchar() function writes character c to stdout.

Return:

putchar() returns c if it is successful and returns EOF if it fails.

See Also:

"Wide Character and Byte Character Stream Orientation"

"fputc"

"putc"

Example of putchar() usage.:
#include <stdio.h>

int main(void)
{
	static char test[] = "running jumping walking tree\n";
	int i;

	// output the test character one character
	// at a time until the null character is found.
	for (i = 0; test[i] != '\0'; i++)
		putchar(test[i]);

	return 0;
}

Output:
running jumping walking tree


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 16, 2000