Multiple choice

Consider the following C-program:

double foo(double); /* Line 1 */
int main() {
  double da, db;
  // input da
  db = foo(da);
}

double foo(double a) {
  return a;
}

The above code complied without any error or warning. If Line 1 is deleted, the above code will show

  1. no compile warning or error

  2. some complier-warning not leading to unitended results

  3. Some complier-warning due to type-mismatch eventually leading to unitended results

  4. Complier errors

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Here if line 1 which is prototype declaration of the function foo, in C compilation processes this would give a compile warning, due to type-mismatch. Since then compiler won't know what the return type of foo is. So unintended results may occur