summaryrefslogtreecommitdiff
path: root/ch2/types.c
blob: 8ef4c915783806391dabd5b3432811378245a021 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include<stdio.h>

int stringlen(char s[]) {
    int i;

    i = 0;
    while (s[i] != '\0')
        ++i;
    return i;
}

int main() {
    //int count = stringlen("test");
    //printf("%d\n", count);


    //enum fruit {
    //    APPLE,
    //    PEAR,
    //    BANANA,
    //};
    //printf("%d\n", PEAR);


}