+ 19
Why would anyone downvote this quiz? (declined due to community downvotes)
What is the output of this code? stack<int> s; int a=2; int *p=&a; for(int i=0;i<4;i++) s.push(*p+i); cout << s.top(); Is it because it's too easy or what? SL should add a comment area where the quizzes are commented on so we know what is going on.
19 ответов
+ 22
to tell you a secret - there seems to be no real way to say if a quiz is going to pass. Some time ago I had some quizzes declined due to different reasons, I got a bit angry and immediately resubmitted most of them expecting that they will get rejected again. Guess what - the next DAY few of them got accepted, so it seems it mostly depends on the guy who is approving's mood or something.
At that point I felt disappointed and I've stopped submitting...☹
+ 14
Quiz Factory is messed up. It declined my core programming concepts related quizzes as the norm is to accept math quizzes. Jeez 😒
+ 13
@Nikolay me too....I hate to suggest a quiz...!!😝😝😝 because all of my quizzes declined DUE TO DOWNVOTES ONLY....!!!
+ 12
@Nikolay, funny because that was exactly what I wanted to do....I'm gonna resubmit them. :D
+ 11
@Maryam, check out Manual's link. stack<int> is a stack (a Last In First Out data structure) of ints. Push() simply stacks 4 values in the loop, the last one being 2+3 = 5, and top() simply returns the value on top of the stack, which is the last one.
+ 10
Here's a great resource I just discovered on the STL.
http://www.fluentcpp.com/stl/
+ 9
@Restoring faith, it is not different from the other courses, a lot of the quizzes in the other languages are not taught in the courses.
+ 9
They don't even seem to accept math quizzes either. I have tried and always got "too many similar questions exist". I even made simple matrix codes, where some involved summing/multiplying the elements of a diagonal or secondary diagonal and they got declined due to downvotes.
Guess I can forget the 2k xp for Creator badge. SL has proven that they won't accept new material and defeat the purpose of learning new things.
+ 8
I assume people down-vote because it wasn't taught in the course¿
+ 8
The whole STL should be known, it is very useful. I don't understand why Java can have quizzes with Generics in them, and C++ should not have STL containers quizzes.
+ 7
Yes it is 5. If people don't know what a stack data structure is, they are missing out on a lot of things.
+ 5
Its either the compiler or its my poor coding skills.
-It would be nice to have more than one chance to input data on SL like javascript, with C++.
+ 4
I believe it is 5
@Helioform
People probably did not get it,
like @Ace's question a few weeks ago.
I need to use .push and .top in a code.
+ 4
@Helioform I learned it from a youtube video a few days ago.
I will link the video and a tutorial, for whoever wants to use the stack data structure.
Stack data structure tutorial
http://www.cplusplus.com/reference/stack/stack/
C++ vid
https://youtu.be/Rub-JsjMhWY
+ 4
I have only 2 accepted quizzes while others have a hundred! 😱
+ 4
I think there is a bitof buyestness nowadays. If a question is too hardthey know they'll screw up in it ao they don't want it. If it's easy, it will be good for challenges
I used ti have that mentality, but now no more.
+ 2
I need to compile it in visual studio.
The C++ compiler here is different from normal ones.
[edited]
I think the javascript interpreter is the best one SL has.