4. Examine this program and anticipate the output:
#include <iostream.h>
int main(){
int a = 1, b = 1, c=2;
if (c = (a-b))
6: cout << "The value of c is: " << c;
}
There is compiled error. 6 is not correct name of label. And iostream.h may be wrong file name on some systems. If those error are fixed, no output will be because it would output if c is not 0, but c = a - b, therefore it's 0
Comments
Leave a comment