Language: C

#include <stdio.h>

struct candy { int i, p, q, r; };

int main(void)
{
    int n;

    while (scanf("%d", &n), n != 0){
        candy c[1024];
        candy maxi;
        int sum;
        int i;

        for (i = 0; i < n; i++) scanf("%d %d %d %d", &c[i].i, &c[i].p, &c[i].q, &c[i].r);
        scanf("%d %d %d %d", &maxi.i, &maxi.p, &maxi.q, &maxi.r);
        for (i = sum = 0; i < n; i++){
            if (c[i].i <= maxi.i && c[i].p <= maxi.p && c[i].q <= maxi.q && c[i].r <= maxi.r){
                sum++;
            }
        }
        printf("%d\n", sum);
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: unknown type name 'candy'; use 'struct' keyword to refer to the type
   10 |         candy c[1024];
      |         ^~~~~
      |         struct 
main.c:11:9: error: unknown type name 'candy'; use 'struct' keyword to refer to the type
   11 |         candy maxi;
      |         ^~~~~
      |         struct 
main.c:15:59: error: request for member 'i' in something not a structure or union
   15 |         for (i = 0; i < n; i++) scanf("%d %d %d %d", &c[i].i, &c[i].p, &c[i].q, &c[i].r);
      |                                                           ^
main.c:15:68: error: request for member 'p' in something not a structure or union
   15 |         for (i = 0; i < n; i++) scanf("%d %d %d %d", &c[i].i, &c[i].p, &c[i].q, &c[i].r);
      |                                                                    ^
main.c:15:77: error: request for member 'q' in something not a structure or union
   15 |         for (i = 0; i < n; i++) scanf("%d %d %d %d", &c[i].i, &c[i].p, &c[i].q, &c[i].r);
      |                                                                             ^
main.c:15:86: error: request for member 'r' in something not a structure or union
   15 |         for (i = 0; i < n; i++) scanf("%d %d %d %d", &c[i].i, &c[i].p, &c[i].q, &c[i].r);
      |                                                                                      ^
main.c:16:35: error: request for member 'i' in something not a structure or union
   16 |         scanf("%d %d %d %d", &maxi.i, &maxi.p, &maxi.q, &maxi.r);
      |                                   ^
main.c:16:44: error: request for member 'p' in something not a structure or union
   16 |         scanf("%d %d %d %d", &maxi.i, &maxi.p, &maxi.q, &maxi.r);
      |                                            ^
main.c:16:53: error: request for member 'q' in something not a structure or union
   16 |         scanf("%d %d %d %d", &maxi.i, &maxi.p, &maxi.q, &maxi.r);
      |                                                     ^
main.c:16:62: error: request for member 'r' in something not a structure or union
   16 |         scanf("%d %d %d %d", &maxi.i, &maxi.p, &maxi.q, &maxi.r);
      |                                                              ^
main.c:18:21: error: request for member 'i' in something not a structure or union
   18 |             if (c[i].i <= maxi.i && c[i].p <= maxi.p && c[i].q <= maxi.q && c[i].r <= maxi.r){
      |                     ^
main.c:18:31: error: request for member 'i' in something not a structure or union
   18 |             if (c[i].i <= maxi.i && c[i].p <= maxi.p && c[i].q <= maxi.q && c[i].r <= maxi.r){
      |                               ^
main.c:18:41: error: request for member 'p' in something not a structure or union
   18 |             if (c[i].i <= maxi.i && c[i].p <= maxi.p && c[i].q <= maxi.q && c[i].r <= maxi.r){
      |                                         ^
main.c:18:51: error: request for member 'p' in something not a structure or union
   18 |             if (c[i].i <= maxi.i && c[i].p <= maxi.p && c[i].q <= maxi.q && c[i].r <= maxi.r){
      |                                                   ^
main.c:18:61: error: request for member 'q' in something not a structure or union
   18 |             if (c[i].i <= maxi.i && c[i].p <= maxi.p && c[i].q <= maxi.q && c[i].r <= maxi.r){
      |                                                             ^
main.c:18:71: error: request for member 'q' in something not a structure or union
   18 |             if (c[i].i <= maxi.i && c[i].p <= maxi.p && c[i].q <= maxi.q && c[i].r <= maxi.r){
      |                                                                       ^
main.c:18:81: error: request for member 'r' in something not a structure or union
   18 |             if (c[i].i <= maxi.i && c[i].p <= maxi.p && c[i].q <= maxi.q && c[i].r <= maxi.r){
      |                                                                                 ^
main.c:18:91: error: request for member 'r' in something not a structure or union
   18 |             if (c[i].i <= maxi.i && c[i].p <= maxi.p && c[i].q <= maxi.q && c[i].r <= maxi.r){
      |                                                                                           ^