Max
Error(s): source_file.c: In function ‘maxarray’:
source_file.c:11:19: error: invalid operands to binary & (have ‘int *’ and ‘int’)
if ((array&(1<<(i+1)))>(array&(1<<i)))
^
source_file.c:11:38: error: invalid operands to binary & (have ‘int *’ and ‘int’)
if ((array&(1<<(i+1)))>(array&(1<<i)))
^
source_file.c:13:25: error: invalid operands to binary & (have ‘int *’ and ‘int’)
max = (array&(1<<(i+1)));
^
source_file.c:17:25: error: invalid operands to binary & (have ‘int *’ and ‘int’)
max = (array&(1<<i));
^
source_file.c: In function ‘main’:
source_file.c:29:13: warning: passing argument 1 of ‘sprintf’ from incompatible pointer type [-Wincompatible-pointer-types]
sprintf(Array, "12345");
^
In file included from /usr/include/features.h:367:0,
from /usr/include/stdio.h:27,
from source_file.c:3:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:31:1: note: expected ‘char * restrict’ but argument is of type ‘int *’
__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
^
|
|