foo.cc: In function 'int main()':
foo.cc:10:62: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[25]' [-Wformat=]
scanf("%s %d %d %c %c %d ",&s[i],&q1,&q2,&c1,&c2,&num);
~~~~~ ^
foo.cc:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
foo.cc:10:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s %d %d %c %c %d ",&s[i],&q1,&q2,&c1,&c2,&num);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:7:37: warning: 'k' may be used uninitialized in this function [-Wmaybe-uninitialized]
int n,sum=0,max=0,q1,q2,num,a,b,k;
^