Borderou de evaluare (job #1483966)
Utilizator | Data | 10 septembrie 2015 11:08:53 | |
---|---|---|---|
Problema | Al k-lea termen Fibonacci | Status | done |
Runda | Arhiva educationala | Compilator | c | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.c: In function ‘prod’:
user.c:11:2: warning: return from incompatible pointer type [enabled by default]
return res;
^
user.c:11:2: warning: function returns address of local variable [-Wreturn-local-addr]
user.c: In function ‘put’:
user.c:17:3: warning: return from incompatible pointer type [enabled by default]
return res;
^
user.c:17:3: warning: function returns address of local variable [-Wreturn-local-addr]
user.c:19:5: error: expected identifier or ‘(’ before ‘[’ token
int[2][2] res = (*prod(put(n, p/2), put(n, p/2)))[2];
^
user.c:21:3: error: ‘res’ undeclared (first use in this function)
res = (*prod(res, n))[2];
^
user.c:21:3: note: each undeclared identifier is reported only once for each function it appears in
user.c: In function ‘main’:
user.c:38:3: error: invalid initializer
int mult[2][2] = (*put(tab, k - 1))[2];
^
user.c: In function ‘put’:
user.c:24:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
user.c: In function ‘main’:
user.c:29:8: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(fin, "%d\n", &k);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !