#include<stdio.h>
int main()
{
char str[6][50] ; // a 2d character array
int i ;
for(i = 0 ; i < 6 ; i++)
{
scanf("%s",(str+i)) ; // in here the warning was shown
}
return 0 ;
}`
During Output :- scanf() is showing warning on compilation - warning: format ‘%s’ expects argument of type ‘char ’, but argument 2 has type ‘char ()[50]’ [-Wformat=]