24 lines
310 B
C
24 lines
310 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
void print_array(char *pstr) {
|
||
|
|
||
|
for (unsigned int i=0; i<10; i++) {
|
||
|
printf("%c", *pstr++);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
int main(void) {
|
||
|
static char str[11];
|
||
|
|
||
|
for (unsigned int i=0; i<10; i++) {
|
||
|
str[i]='0'+i;
|
||
|
}
|
||
|
|
||
|
str[10]='\0';
|
||
|
|
||
|
print_array(str);
|
||
|
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|