a=5, b=6 and d=3.5
c=a++ - (b++)*(--d)
Answers
Answered by
0
abcdkjchddkifchxjxzkzbddj
Answered by
0
-10 is the correct answer to the given question if we consider a,b as int type and d and c consider as float type then it print -10 on the console window.
Explanation:
- Here we defined a,b as integer type variable and c and d consider as the float type variable .
The operation c=a++ - (b++)*(--d) is executed in such a manner that is mention below :
- Firstly (b++)*(--d) this part will be executed and it provides the output 15 because --d means 3.5-1 =2.5 but b++ is remains the value 6 because in b++ post increment operator is there so it assign the value first so overall operation gives result 15.
- After that a++ gives 5 because in a++ post increment operator is there it assign the value first so it gives 5.
So c=5-15=-10
Following are the program in C++ language
#include <iostream> // header file
using namespace std; // namespace
int main() // main function
{
int a=5, b=6; // variable declaration
float d=3.5;
float c;
c= a++ - (b++)*(--d); // operation
cout<<c; // display
return 0;
}
Output:-10
Learn More:
- brainly.in/question/9144307
Similar questions