home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C Programming Starter Kit 2.0
/
SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso
/
tyc
/
list1412.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-16
|
614b
|
30 lines
/* Using putchar() to display strings. */
#include <stdio.h>
#define MAXSTRING 80
char message[] = "Displayed with putchar().";
main()
{
int count;
for (count = 0; count < MAXSTRING; count++)
{
/* Look for the end of the string. When it's found, */
/* write a newline character and exit the loop. */
if (message[count] == '\0')
{
putchar('\n');
break;
}
else
/* If end of string not found, write the next character. */
putchar(message[count]);
}
}