foo.c: In function 'main':
foo.c:10:1: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(i=1;i<=N;i++)
^~~
foo.c:12:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
for(i=1;i<=M;i++)
^~~
foo.c:9:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&N,&M);
^~~~~~~~~~~~~~~~~~~
foo.c:11:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a[i]);
^~~~~~~~~~~~~~~~~
foo.c:13:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
{ scanf("%d",&b);
^~~~~~~~~~~~~~