5 views
24 Jan 2026
Write the expression: q = (a = 5, b = 10, a + b);. What is the value of q? Explain the evaluation sequence of the comma operator....
3 views
24 Jan 2026
Test the modulo operator with negative numbers. What result will -7 % 3 give? What difference can there be between different couplings?...
7 views
24 Jan 2026
Left shift the number and multiply it by 2. Neither ...
4 views
24 Jan 2026
Count the number of 1 bits in an integer using bitwise operators. Use the & operator in a loop and right shift it....
8 views
24 Jan 2026
Write the expression: (a > 0) && (++b > 5). If a = 0, will b be incremented or not? Verify by testing short-circuit evaluation....
5 views
24 Jan 2026
By assigning grade with nested ternary operators (90+=A, 80+=B, etc). Then write the same logic if-else. Readability compare....
3 views
24 Jan 2026
Write the expression: a = 5, b = 10, c = 15; result = a + b * c / 5 - 2 % 3; calculate manually, following operator precedence. Then verify with the program....
3 views
24 Jan 2026
Swap two numbers using the SOR operator. Show step-by-step how the values ββare exchanged. Provide a mathematical proof...
4 views
24 Jan 2026
Check if a number is a power of 2 or not using only bitwise operators. (Hint: n & (n-1) == 0). Explain the logic....
2 views
24 Jan 2026
8 boolean flags can be stored in a single char variable using bitwise operators. Create Functions: setFlag(), clearFlag(), toggleFlag(), checkFlag()....