Adding file
This commit is contained in:
parent
6b888cc718
commit
3562af25e7
|
@ -0,0 +1,23 @@
|
|||
#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;
|
||||
}
|
Loading…
Reference in New Issue