The statement A += B is equivalent to
- A = B + B
- A = A + B
- A = A - B
- A = B - A
Explanation
- A += B is equivalent to A = A + B.
- It's the compound assignment operator for addition.
- It takes the current value of A, adds B to it, and stores the result back into A.
Other compound operators follow the same pattern:
- A -= B → A = A - B
- A *= B → A = A * B
- A /= B → A = A / B
- A %= B → A = A % B
Related MCQs
- Star Topology
- Bus Topology
- Ring Topology
- Mesh Topology
اس سوال کو وضاحت کے ساتھ پڑھیں
- Integration Testing
- Unit Testing
- System Testing
- Acceptance Testing
اس سوال کو وضاحت کے ساتھ پڑھیں
- True
- False
- Partially True
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
مندرجہ ذیل میں سے ڈیٹا پروسیسنگ کی درست ترتیب کون سی ہے؟
- Input → Processing → Output → Storage
- Processing → Input → Storage → Output
- Storage → Input → Processing → Output
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
- --
- ++
- +=
- **