+ 1

What is output of this coding? Please help me.

#include <iostream> using namespace std; int main(){ int x = (1,2,3,4,5); int y[3]; y[0] = x++; y[1] = ++x; y[2] = --x; cout << y[2] + y[1] + y[0]; return 0; }

19th Aug 2019, 8:24 AM
🌠Ratnesh Rakesh Ranjan 🇮🇳
🌠Ratnesh Rakesh Ranjan 🇮🇳 - avatar
5 Respostas
+ 2
18
19th Aug 2019, 8:36 AM
Perez
Perez - avatar
+ 1
Error because 'Cout' is unknown and the using directive is in the same line as the include directive, 18 if you fix those errors.
19th Aug 2019, 8:29 AM
Shadow
Shadow - avatar
+ 1
x = 5; y[0]= 5; y[1]= 7; y[2]= 6 Output: 6+7+5= 18
19th Aug 2019, 8:31 AM
Tom Hammerbacher
Tom Hammerbacher - avatar
0
Thanks 👍👍
19th Aug 2019, 11:22 AM
🌠Ratnesh Rakesh Ranjan 🇮🇳
🌠Ratnesh Rakesh Ranjan 🇮🇳 - avatar