What will be the value of of a and b after the execution of the following statement. int a, b=3 a=++b*++b;
Answers
Answered by
1
Answer:
Depends on the programming language: the question is not specifying one. Different languages - different rules.
In languages where “+++” is not an operator and both “++” and “+” are, three plusses in a row typically parse as “++ +”, giving “++c++ + c”. In C and C++ and Java, that is ill-formed (cannot be compiled)
If you were to add a space to make that into “++c + ++c”, the resulting expression is undefined in C and C++: the program that attempts to evaluate this is meaningless and any value you may see in a given test (I notice some other answers bring up 24 and 23) is also just noise from a broken program.
Explanation:
Similar questions
English,
1 month ago
Biology,
3 months ago
Physics,
9 months ago
World Languages,
9 months ago
Math,
9 months ago