Computer Science, asked by sofan, 1 year ago

Rectify the errors in the following code and obtain the result. a,b=12,16 a,b=b,a+2 print =a, b​

Answers

Answered by tajuddin68
3

Explanation:

tui ohh ask khorsotnii

Answered by suskumari135
3

The correct statements

a=12

b=16

a=b;

b=a+2;

Explanation:

a,b=12,16 a,b=b,a+2 print =a, b​

In above statements, The declaration of variables a and b is incorrect

Print =a,b is also incorrect statement.

Correct Program:

#include <stdio.h>

int main()

{

   int a,b;

   a=12;

   b=16;

   a=b;

   b=a+2;

   printf("a=%d b=%d ",a,b);

   return 0;

}

Output:

a=16 b=18

Similar questions