Solution for Exercise 19-13
#include <stdio.h>
int main()
{
char sample[] = "From whence cometh my help?\n";
char *ps;
ps = sample; /* initialize the pointer */
while(*ps)
{
putchar(*ps);
ps++;
}
return(0);
}
Output
From whence cometh my help?
Notes
* It's considered safe coding practice to retain the == '\0'
part of the while loop's evaluation, but the program still runs as intended.
Copyright © 1997-2024 by QPBC.
All rights reserved