Advertisements
Advertisements
प्रश्न
The output of a++ will be 1, if int a = -1.
पर्याय
True
False
MCQ
चूक किंवा बरोबर
उत्तर
This statement is False.
Explanation:
- If int a = -1, then a++ is a post-increment operation. This means that the current value of a (which is -1) is used first, and then a is incremented by 1.
- So, the output of a++ will be -1 (the original value), and after this operation, a will become 0.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?