Question:
What is the value of c before the program below terminates?
My options are:Code:#include <stdio.h>
int main() {
int a,b,c;
a = 4;
b = a-2;
if (a > b)
c = b;
else
c = 8;
return 0;
}
A) 2
B) 3
C) 7
D) 8
E)None of the Above
and I said E) None of the above b/c C isn't initialized or defined before the program runs.
If the declarations read: " int a,b, c=1; " then I suppose c would have a value before the program ran, is my logic correct?