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