foo.cc: In function 'int main()':
foo.cc:11:27: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int*' [-Wformat=]
scanf("%s",a[b[j]]);
^
foo.cc:14:27: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int*' [-Wformat=]
printf("%s\n",a[j]);
^
foo.cc:5:15: warning: unused variable 'k' [-Wunused-variable]
int i=0,j,k;
^
foo.cc:8:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&b[i++]);
~~~~~^~~~~~~~~~~~~~
foo.cc:11:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",a[b[j]]);
~~~~~^~~~~~~~~~~~~~