diff options
Diffstat (limited to 'wk2/sect/str.c')
-rw-r--r-- | wk2/sect/str.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/wk2/sect/str.c b/wk2/sect/str.c new file mode 100644 index 0000000..5075431 --- /dev/null +++ b/wk2/sect/str.c @@ -0,0 +1,15 @@ +#include <stdio.h> +#include <ctype.h> +#include <cs50.h> +#include <string.h> + +int main(void) +{ + string name = "Emma"; + int l = strlen(name); + for (int i = 0; i < l; i++) + { + printf("%i ", name[i]); + } + printf("\n"); +} |