0

This program didn't show output why? It is the saved one

#include <iostream> using namespace std; int main() { /* Comment out printing of Hello world! cout << "Hello world!"; // prints Hello world! */ return 0; }

7th May 2019, 2:53 AM
Sabal Regmi
Sabal Regmi - avatar
6 odpowiedzi
+ 1
I just copied it from code playground And when I clicked run It didn't show output
7th May 2019, 3:33 AM
Sabal Regmi
Sabal Regmi - avatar
0
Remove the comments and you will get the output. #include<iostream> using namespace std; int main() { cout <<" Hello world"; return 0; }
8th May 2019, 2:29 PM
Hariesh Kishore
Hariesh Kishore - avatar
0
Bt it was the chapter of comment bro
8th May 2019, 2:35 PM
Sabal Regmi
Sabal Regmi - avatar
0
Then try this..... #include<iostream> using namespace std; int main() { /* Comment out printing of Hello world */ cout <<" Hello world";//prints hello return 0; }
8th May 2019, 2:39 PM
Hariesh Kishore
Hariesh Kishore - avatar
0
Anything written within (/* */) without bracket is treated as comments which means it should not be executed For single line comment we use double slash // For multiple lines we use /* at beginning and */ at the end
8th May 2019, 2:42 PM
Hariesh Kishore
Hariesh Kishore - avatar