Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Please explain the following expression which is of c++
- I have a statement:
- which is just:
- a + b + c + d ;
- where "a", "b", "c" and "d" could be any type like int or double or string or any expression of your choice!
- for extra understanding, you often you come across syntax such as:
- a = b + c ;
- where "a" stores a value which is a result of addition of "b" & "c", so its like assignment operation. But the above statement in question does not even seem to assign anything.
- So the questions for you is:
- 1. is the above statement simply meaningless?
- 2. Since its making Addition but not actually Assigning it to anything?
- 3. so its not really having any side-effect such that, its existence and non-existence cannot have any change on the system system?
- 4. or can such statement can really bring any changes to the system (or application or program whatever word you say )?
- For more clarity, please take note that this statement could appear anywhere in the program, for example, this statement can validly appear inside a function, which may or may not be a member of a class. a, b, c, d could be just any valid types (primitive types) or object of c++.
- thats all
Advertisement
Add Comment
Please, Sign In to add comment