Arrays-linear search

question:https://hack.codingblocks.com/contests/c/509/199
answer:https://ide.codingblocks.com/#/s/24047
run error

Your code runs for i=0, checks whether a[0]==m, if not it returns -1. Actually we should not do it that way. Also it is asked to print the returned value.

Try it out yourself. In case you face any problem, see this link:

https://ide.codingblocks.com/#/s/24245