0 votes 0 votes closed with the note: find the answer. It is mandatory , the function should have prototype function in main because if the function is not declared at the point of the call, the compiler "guesses" (infers) the declaration implicitly from the types of the arguments passed in the call and assumes that the return type is int. My question is it gives syntactically error or compilation error or no error if we are not defining prototype function in main. anshul namdeo asked Oct 12, 2016 • closed Oct 12, 2016 by anshul namdeo anshul namdeo 274 views comment Share Follow See all 0 reply Please log in or register to add a comment.
3 votes 3 votes This guess was there only before C11 standard. Now, as per C11, it is a MUST that we should give prototype. Else, compiler may throw warning or error- it is up to compiler implementation. Arjun answered Oct 12, 2016 Arjun comment Share Follow See all 0 reply Please log in or register to add a comment.