i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout<<k;
}
//please comment on the output



i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<<k; } //please comment on the output..

Answer / Avinash Verma

{"answers": ["The given C++ code will print the numbers from 20 to 1 in increments of 3 or 4 (depending on whether j is less than 10), until k equals 1. The output will be: 20, 23, 26, 29, 32, 35, 38."]}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

Is oop better than procedural?

1 Answers  


what is different between oops and c++

1 Answers   IIT,


why destructor is not over loaded?

5 Answers  


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

1 Answers  


what is the need of abstraction? what is abstraction?what is the abstraction for stack?

8 Answers   CTS, Verizon,


polymorphism means?

6 Answers   BFL,


how much classes are used in c++

5 Answers  


What is multiple inheritance ?

17 Answers   Blue Star, C DAC, CDAC, Impetus, Ness Technologies, Softvision Solution,


can you give the dynamic polymorphism types?

2 Answers   Wipro,


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

1 Answers   UBS,


Can a varargs method be overloaded?

1 Answers  


what is the sylabus for priliminaries?

1 Answers  


Categories