The following program results in a compiler error. Why? int FindMin(int a, int b) {   int min;   if (a < b) {      min = a;   }   else {      min = b;   }   return min; } int main() {   int x;   int y;   cin >> x;   cin >> y;     min = FindMin(x,y);   cout << "The smaller number is: " << min << endl;      return 0; }Single choice

A

The variable min should be a parameter

B

FindMin() should be defined after main(), not before.

C

The variable min is not initialized

D

The variable min is declared in FindMin(), but is used in main()

Log in for full answers

We've collected over 50,000 authentic original questions and detailed explanations from around the globe. Log in now and get instant access to the answers!

Similar Questions

More Practical Tools for Students Powered by AI Study Helper

Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!