Why would anyone downvote this quiz? (declined due to community downvotes) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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.

3rd Jun 2017, 6:01 PM
Karl T.
Karl T. - avatar
17 Answers
+ 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...☹
5th Jun 2017, 4:05 PM
Nikolay Nachev
Nikolay Nachev - avatar
+ 14
Quiz Factory is messed up. It declined my core programming concepts related quizzes as the norm is to accept math quizzes. Jeez 😒
4th Jun 2017, 3:14 AM
Pixie
Pixie - avatar
+ 13
@Nikolay me too....I hate to suggest a quiz...!!😝😝😝 because all of my quizzes declined DUE TO DOWNVOTES ONLY....!!!
5th Jun 2017, 4:10 PM
Ishwarya Manikandan
Ishwarya Manikandan - avatar
+ 12
@Nikolay, funny because that was exactly what I wanted to do....I'm gonna resubmit them. :D
5th Jun 2017, 4:20 PM
Karl T.
Karl T. - avatar
+ 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.
3rd Jun 2017, 7:49 PM
Karl T.
Karl T. - avatar
+ 10
Here's a great resource I just discovered on the STL. http://www.fluentcpp.com/stl/
4th Jun 2017, 1:49 AM
Karl T.
Karl T. - avatar
+ 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.
3rd Jun 2017, 7:38 PM
Karl T.
Karl T. - avatar
+ 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.
4th Jun 2017, 7:02 AM
Karl T.
Karl T. - avatar
+ 8
I assume people down-vote because it wasn't taught in the course¿
3rd Jun 2017, 7:34 PM
Rrestoring faith
Rrestoring faith - avatar
+ 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.
3rd Jun 2017, 7:35 PM
Karl T.
Karl T. - avatar
+ 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.
3rd Jun 2017, 7:24 PM
Karl T.
Karl T. - avatar
+ 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++.
3rd Jun 2017, 7:50 PM
Manual
Manual - avatar
+ 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.
3rd Jun 2017, 7:19 PM
Manual
Manual - avatar
+ 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
3rd Jun 2017, 7:30 PM
Manual
Manual - avatar
+ 4
I have only 2 accepted quizzes while others have a hundred! 😱
6th Jun 2017, 5:08 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 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.
6th Jun 2017, 6:28 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 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.
3rd Jun 2017, 7:45 PM
Manual
Manual - avatar