| | |
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 array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data database delete desktop developer directshow dll download dynamic encryption error file forms fstream function functions game generator getline givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number output parameter pointer problem program programming project proxy python random read recursion recursive return string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





