int x = 6;
Console.WriteLine(x |= 1);
Why is the console output 7 for this code?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Nitin SontakkeRank #264 · 9.6K reputationPosted Jun 1, 2017, 4:16 AM EDT
harish reddy176 reputationPosted Jun 1, 2017, 4:55 AM EDT
Nitin SontakkeRank #264 · 9.6K reputationPosted Jun 1, 2017, 6:46 AM EDT