Computer Science, asked by nishanthkumar26, 5 months ago

(Q)What is the output of C program.?
#include <stdio.h>
#define LOGIC(a,b) (a==b)
int main()
{
if(LOGIC(5,5))
{
printf("SAME ");
}
return 0;
}
A)SAME
B) LOGIC(5,5)
C)5==5
D)Compiler error​

Answers

Answered by jitesh2020
0

jajananajayys evsjsjsjjwjzjns8ew

Answered by ravi2303kumar
0

Answer:

A) SAME

Explanation:

the definition of LOGIC(a,b) check whether a and b are equal.

and in the program the printf statement is executed when LOGIC(5,5) is true.

yes 5 and 5 are equal . so the string "SAME" is printed as an output in the c shell

Similar questions