| | |
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 |
Tag cloud for C++
6 add api array arrays beginner binary bmp c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui iamthwee ifstream input int java lib library lines linkedlist linker loop looping loops map math matrix memory microsoft newbie news number output pointer problem program programming project python random read recursion recursive reference return sort string strings struct studio system temperature template templates test text text-file tree unix url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets





