+ 3
What is the output of this program? #include<iostream> int main() { int k=6,m=1; k-=k; m=m+k; cout<<k<<" "<<m; return 0; }
Simple game.
17 Antworten
+ 3
Output is :
0 1
+ 3
Balaji name space is needed for simple program??
+ 2
bro,i think the output is :
0 1
+ 2
and give namespace std;
+ 2
0 1
+ 2
k=0
+ 2
m=1
+ 2
No output. Compile Error.
without "using namespace std;"
or using "std::cout" instead of "cout"
+ 2
k=0 m=1
+ 1
so the output is :
0 1
+ 1
Yup
the answer is 0 1
+ 1
out put is
k=0
M=1
+ 1
out put is
k=0
M=1
+ 1
why k = 0 and m = 1 .can anyone explain??
+ 1
initially k=6 & m=1
then k-=k => k=k-k => 6-6=0
m=m+k => 1+0 = 1.
so k=0 and m=1
0
dont know
0
kiwiyo
tanks for your information.