if alpha and beta were int variables, the statement alpha = --beta is equivelent to what statement?
also what would alpha = beta++ be equivilent to what statement. i know you add 1 to the first one but it doesn't seem right. any help would be appreciated.
dblbac
0
Light Poster
Recommended Answers
Jump to PostWhen you say --x, x is decremented by one before being used in the expression. Likewise, ++x increments x by one before using it in the expression. x++ or x-- will perform the increment or decrement after using the value in the expression.
int x = 0; …
All 4 Replies
Narue
5,707
Bad Cop
Team Colleague
Duoas
1,025
Postaholic
Featured Poster
Narue
5,707
Bad Cop
Team Colleague
dblbac
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.