| | |
Unary operators
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Hello Random People,
I'm new to C++, and I have some questions for all you'all. The first subject I'd like to talk about is Unary Operators. They give me a sample problem in the book. (The book is was published about 2 years ago)
Sample Problem:
int Result, A, B;
A = 4;
B = 23;
Result = 9 + (A++ - --B) * B
Result = ?
The answser -471.
I don't understand how you get that number. Can someone please explane to me how it works. :p
I'm new to C++, and I have some questions for all you'all. The first subject I'd like to talk about is Unary Operators. They give me a sample problem in the book. (The book is was published about 2 years ago)
Sample Problem:
int Result, A, B;
A = 4;
B = 23;
Result = 9 + (A++ - --B) * B
Result = ?
The answser -471.
I don't understand how you get that number. Can someone please explane to me how it works. :p
![]() |
Similar Threads
- Definitions Some C++ operators (C++)
- please helpme i have small doubt in post and pre increment operators (C)
- Unary Operators (C++)
Other Threads in the C++ Forum
- Previous Thread: fstream and struct question
- Next Thread: Unary Operators
| Thread Tools | Search this Thread |
api application array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game generator getline graph homeworkhelper iamthwee ifstream input int integer java lib linux list loop looping loops map math matrix memory multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates text tree url vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets





