C Programming - Structures, Unions, Enums - Discussion

Discussion Forum : Structures, Unions, Enums - Find Output of Program (Q.No. 7)
7.
What will be the output of the program ?
#include<stdio.h>

int main()
{
    int i=4, j=8;
    printf("%d, %d, %d\n", i|j&j|i, i|j&j|i, i^j);
    return 0;
}
12, 12, 12
112, 1, 12
32, 1, 12
-64, 1, 12
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
58 comments Page 5 of 6.

Maheshkumar said:   2 decades ago
Do the operation from left to right.

Ravi said:   7 years ago
Good explanation, Thanks. @Ramadas.
(1)

Earl said:   8 years ago
Thanks to all your explanations.

Harshada said:   7 years ago
Not understood. Please help me.

Sonali said:   9 years ago
Good explanation @Abinandank.

Koushik said:   1 decade ago
Thanx vedhasree...!!!

Sanket said:   6 years ago
Thanks @Vedhashree.

Chandru said:   8 years ago
Thanks @Vedhashree.

Anchan said:   8 years ago
Thanks @Vedhashree.

Manoja V. said:   8 years ago
Thanks @Vedhashree.


Post your comments here:

Your comments will be displayed after verification.