1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
int main(int argc, char *argv[]) {
    char s[] = "nuf";
    int n = strlen(s);
    int i;
    for(i = n - 1; i > 0; i--) {
        char ch = s[i];
        assert(ch != '\0' && ch > 0 && ch <= 127);
        assert(i < strlen(s) && i >= 0);
        printf("%c", ch);
    }
    assert(i<0 && i<n);
    return 0;
}

This content is protected and may not be shared, uploaded, or distributed.    © 2019 Alexander J. Quinn.