Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 4 years ago

Language

C

Compiler

gcc 10.1.0

Options
Warnings
C99
-pedantic

Author

anonymous

about 4 years ago

$ gcc prog.c -Wall -Wextra -std=c99 -pedantic
prog.c: In function 'main':
prog.c:13:46: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
   13 | for (p=T;p<T+n;p++){printf("Enter element T[%d]=",p-T);
      |                                             ~^    ~~~
      |                                              |     |
      |                                              int   long int
      |                                             %ld
prog.c:6:8: warning: unused variable 'i' [-Wunused-variable]
    6 | int *T,i,n,*p,*k;
      |        ^
entrez the size of the array
Enter element T[0]=Enter element T[1]=Enter element T[2]=Enter element T[3]=Enter element T[4]=Enter element T[5]=Enter element T[6]=Enter element T[7]=Enter element T[8]=Enter element T[9]=
[	0	0	2	0	3	0	0	4	5	0	]
[	2	3	4	5	]
Exit Code:
0