Question: Question 9 Point out the errors (logical/compiler), if any, in the following program: int main(void) { int a = 12, b = 12: if (a=b)

Question 9 Point out the errors (logical/compiler), if any, in the following program: int main(void) { int a = 12, b = 12: if (a=b) printf(" a and b are equal"): return 0; } Error. Two variables cannot be declared in the same line. There is no logical or compiler error Logical error. For comparison use == and not Question 10 int main(void) { int x = 10, y = 15: if (x % 2 - y%3) printf (" Carpathians"): return 0; 3 No Error Error, printf in wrong place Error inside the if condition for improper use of
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
