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
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?