+ 1
Solve it if you are genuis!!!! What is the output of this code? #include <iostream> using namespace std; int main(){ for(int class=0;class<5;class++) { cout<<class<<endl; } return 0;}
9 Antworten
+ 4
@vikil lakkavatri class is also keyword for declaring a class, and in this context, you're not. It won't compile.
+ 2
Compile error. You're using keyword class as a name for an int variable.
+ 1
thank you cohen creber
+ 1
zen thank u
for knowing your mistake
0
yes, your r8t it gives the compile error but tanz for your convenient ans @cohen creber
0
plzz answer my question me recently posted....
0
i ran that through a compiler and got nothing but errors
- 1
0
1
2
3
4
Why not trying your code in Code Playground next time?
Edit: Oh wait, class is a keyword of the language and can't be used as a variable name. So that was a trick question, uh.
- 3
in above program class is name of data type int
its output will b
0
1
2
3
4
5