#include <stdio.h>
#include <stdlib.h>

int sillyArray(int V[], int size, int z) ;
int sillyArrayInC(int V[], int size, int z) ;

#define XLEN 10

int main(void) {
    int i, rca, rcc, ok ;
    int Xa[XLEN] ;
    int Xc[XLEN] ;
    puts("Hello UART 2 output window\n") ;
    /* Comment out the next line when you get the output working! */
    return (EXIT_FAILURE) ;
    for (i=0; i<XLEN; ++i) {
        Xc[i] = Xa[i] = i*i ;
    }
    rca = sillyArray(Xa,  XLEN,  3) ;
    rcc = sillyArrayInC(Xc, XLEN, 3) ;
    ok = 1 ;
    if (rcc != rca) {
        printf("Problem with return value: %d != %d\n", rcc, rca) ;
        ok = 0 ;
    }
    for (i=0; i<XLEN; ++i) {
        if (Xc[i] != Xa[i]) {
            printf("Problem with element %d: %d != %d\n", i, Xc[i], Xa[i]) ;
            ok = 0 ;
        }
    }
    if (ok) {
        return (EXIT_SUCCESS) ;
    } else {
        return (EXIT_FAILURE) ;
    }
}

