/in/foo.c: In function 'main':
/in/foo.c:6:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
6 | scanf("%d %d %d %d",&l,&s,&t,&m);
| ~^ ~~
| | |
| int * long int *
| %ld
/in/foo.c:6:20: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'long int *' [-Wformat=]
6 | scanf("%d %d %d %d",&l,&s,&t,&m);
| ~^ ~~
| | |
| int * long int *
| %ld
/in/foo.c:6:23: warning: format '%d' expects argument of type 'int *', but argument 4 has type 'long int *' [-Wformat=]
6 | scanf("%d %d %d %d",&l,&s,&t,&m);
| ~^ ~~
| | |
| int * long int *
| %ld
/in/foo.c:6:26: warning: format '%d' expects argument of type 'int *', but argument 5 has type 'long int *' [-Wformat=]
6 | scanf("%d %d %d %d",&l,&s,&t,&m);
| ~^ ~~
| | |
| int * long int *
| %ld
/in/foo.c:8:43: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
8 | for (i = 0; i < m-1; i++) scanf("%d ",&a[i]);
| ~^ ~~~~~
| | |
| | long int *
| int *
| %ld
/in/foo.c:9:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
9 | scanf("%d",&a[m-1]);
| ~^ ~~~~~~~
| | |
| | long int *
| int *
| %ld
/in/foo.c:17:26: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
17 | printf("%d", ans);
| ~^ ~~~
| | |
| int long int
| %ld
/in/foo.c:18:17: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
18 | exit(0);
| ^~~~
/in/foo.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
1 | #include <stdio.h>
+++ |+#include <stdlib.h>
2 |
/in/foo.c:18:17: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
18 | exit(0);
| ^~~~
/in/foo.c:18:17: note: include '<stdlib.h>' or provide a declaration of 'exit'
/in/foo.c:66:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
66 | printf("%d", ans);
| ~^ ~~~
| | |
| int long int
| %ld