Вопросов: 18
Время на прохождение: 20 мин
Команда PVS-Studio вместе с Сергеем Кушниренко подготовила квиз на основе ошибок, описанных в его статьях. Попробуйте найти ошибки в C++ коде и проверить свою внимательность и знание языка. Предупреждаем: ошибки не такие уж и простые!
В этом квизе вы найдете 18 фрагментов кода. В каждом фрагменте спряталась ошибка. Какая — решать вам, мы лишь предложим варианты ответа. Готовы испытать свои силы?
А почему правильным оказался тот или иной ответ, вы сможете узнать в конце квиза :)
В конце теста тебя ждёт подарок!
Результаты опроса
В благодарность за прохождение квиза держи 30-дневный триал от PVS-Studio.
Скачать авторские стикеры для Телеграма
{"uid": "kushnirenko_quiz", "time": {"ru": "20 \u043c\u0438\u043d", "en": "20 min", "fr": "20 min"}, "image": {"ru": "https://cdn.pvs-studio.com/media/quest/kushnirenko-zaglavka-ru_thm__-x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/kushnirenko-zaglavka_thm__-x-.png", "en": "https://cdn.pvs-studio.com/media/quest/kushnirenko-zaglavka_thm__-x-.png"}, "text": {"ru": "\u041a\u043e\u043c\u0430\u043d\u0434\u0430 PVS-Studio \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0421\u0435\u0440\u0433\u0435\u0435\u043c \u041a\u0443\u0448\u043d\u0438\u0440\u0435\u043d\u043a\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0430 \u043a\u0432\u0438\u0437 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0448\u0438\u0431\u043e\u043a, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 \u0435\u0433\u043e \u0441\u0442\u0430\u0442\u044c\u044f\u0445. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 C++ \u043a\u043e\u0434\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0437\u043d\u0430\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430. \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u043c: \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0442\u0430\u043a\u0438\u0435 \u0443\u0436 \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0435!\r\n\u0412 \u044d\u0442\u043e\u043c \u043a\u0432\u0438\u0437\u0435 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 18 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0434\u0430. \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u0441\u043f\u0440\u044f\u0442\u0430\u043b\u0430\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u0430. \u041a\u0430\u043a\u0430\u044f \u2014 \u0440\u0435\u0448\u0430\u0442\u044c \u0432\u0430\u043c, \u043c\u044b \u043b\u0438\u0448\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0442\u0432\u0435\u0442\u0430. \u0413\u043e\u0442\u043e\u0432\u044b \u0438\u0441\u043f\u044b\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u0438\u043b\u044b?\r\n\u0410 \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043e\u0442\u0432\u0435\u0442, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u0432\u0438\u0437\u0430 :)", "en": "The PVS-Studio team created a new C++ quiz! But this time we collabed with Sergei Kushnirenko: the questions for this quiz are errors he described in his articles. Try to spot an error in C++ code and test your language knowledge! But we must warn you: the errors are not so easy to find.\r\nThere are 18 code fragments. Each of these fragments contains an error. You need to find this error and select a correct answer in the quiz. Ready to test your skills?\r\nBy the way, at the end of the quiz, you'll find a link to an article with a detailed analysis of the correct answers:)", "fr": "The PVS-Studio team created a new C++ quiz! But this time we collabed with Sergei Kushnirenko: the questions for this quiz are errors he described in his articles. Try to spot an error in C++ code and test your language knowledge! But we must warn you: the errors are not so easy to find.\r\nThere are 18 code fragments. Each of these fragments contains an error. You need to find this error and select a correct answer in the quiz. Ready to test your skills?\r\nBy the way, at the end of the quiz, you'll find a link to an article with a detailed analysis of the correct answers:)"}, "title": {"ru": "\u0421++ \u043a\u0432\u0438\u0437 \u043e\u0442 PVS-Studio \u0438 \u0421\u0435\u0440\u0433\u0435\u044f \u041a\u0443\u0448\u043d\u0438\u0440\u0435\u043d\u043a\u043e", "en": "C++ quiz by PVS-Studio and Sergei Kushnirenko", "fr": "C++ quiz by PVS-Studio and Sergei Kushnirenko"}, "questions": [{"description": {"ru": "<pre>void UObject::setDeltaPitch(const UMatrix &gizmo) {<br> ....<br> if (_fpzero(amount, eps))<br> return<br> rotateAccum.setAnglesXYZ(axis);<br> ....<br>}\n</pre><p><br></p>", "en": "<pre>void UObject::setDeltaPitch(const UMatrix &gizmo) {<br> ....<br> if (_fpzero(amount, eps))<br> return<br> rotateAccum.setAnglesXYZ(axis);\n ....<br>}\n</pre><p><br></p>", "fr": "<pre>void UObject::setDeltaPitch(const UMatrix &gizmo) {<br> ....<br> if (_fpzero(amount, eps))<br> return<br> rotateAccum.setAnglesXYZ(axis);\n ....<br>}\n</pre><p><br></p>"}, "answers": [{"text": {"ru": "\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u042d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0438\u043d\u043a\u0438.", "en": "Actually, everything's correct. This is just a warm-up example.", "fr": "Actually, everything's correct. This is just a warm-up example."}, "value": 0}, {"text": {"ru": "\u0423 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 _fpzero \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043d\u044b \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b.", "en": "The actual arguments are mixed up in the _fpzero function.", "fr": "The actual arguments are mixed up in the _fpzero function."}, "value": 0}, {"text": {"ru": "\u041a\u043b\u0430\u0441\u0441 UMatrix \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u0438\u043f\u0430\u043c\u0438 float, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c UMatrixD, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u0442\u0438\u043f\u0430\u0445 double.", "en": "The UMatrix class uses the float types, accuracy suffers as the result. Developers should have used UMatrixD based on the double types.", "fr": "The UMatrix class uses the float types, accuracy suffers as the result. Developers should have used UMatrixD based on the double types."}, "value": 0}, {"text": {"ru": "\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0435 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b.", "en": "The code design doesn't match the logic of its operation.", "fr": "The code design doesn't match the logic of its operation."}, "value": 1}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/1-ru_SI0MrMh_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/1-en_59Cr6Z7_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/1-en_59Cr6Z7_thm__218x-.png"}}, {"description": {"ru": "<pre>void UContentPackage::createPackage(dsaFile *m, const void *v, int size) {<br> unsigned char secretDsaKey[3096], L;<br> const unsigned char *p = v;<br> int i, j, t;<br> ....<br> UContent::generateDsaKey(secretDsaKey, sizeof(salt));<br> ....<br> // there was some code to encrypt and sign the file<br> ....<br> memset (secretDsaKey, 0, sizeof(secretDsaKey));<br>}\n</pre><p><br></p><p><br></p>", "en": "<pre>void UContentPackage::createPackage(dsaFile *m, const void *v, int size) {<br> unsigned char secretDsaKey[3096], L;<br> const unsigned char *p = v;<br> int i, j, t;<br> ....<br> UContent::generateDsaKey(secretDsaKey, sizeof(salt));<br> ....<br> // there was some code to encrypt and sign the file<br> ....<br> memset (secretDsaKey, 0, sizeof(secretDsaKey));<br>}\n</pre><p><br></p>", "fr": "<pre>void UContentPackage::createPackage(dsaFile *m, const void *v, int size) {<br> unsigned char secretDsaKey[3096], L;<br> const unsigned char *p = v;<br> int i, j, t;<br> ....<br> UContent::generateDsaKey(secretDsaKey, sizeof(salt));<br> ....<br> // there was some code to encrypt and sign the file<br> ....<br> memset (secretDsaKey, 0, sizeof(secretDsaKey));<br>}\n</pre><p><br></p>"}, "answers": [{"text": {"ru": "\u0424\u0443\u043d\u043a\u0446\u0438\u044f memset \u043d\u0435\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f. \u0412\u044b\u0448\u0435 \u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043d\u0435\u0441\u0435\u043d\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c, \u0441\u0432\u043e\u0434\u044f\u0449\u0430\u044f\u0441\u044f \u043a \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 memset.", "en": "The memset function is fake. The above is an intentional vulnerability that overrides the memset function.", "fr": "The memset function is fake. The above is an intentional vulnerability that overrides the memset function."}, "value": 0}, {"text": {"ru": "\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 memset, \u0442\u0430\u043a \u043a\u0430\u043a \u0441 \u0435\u0433\u043e \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043e\u043d\u0430 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430.", "en": "The compiler removes the call to memset because it thinks it's not needed here.", "fr": "The compiler removes the call to memset because it thinks it's not needed here."}, "value": 1}, {"text": {"ru": "\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 memset \u0438\u0437-\u0437\u0430 \u0440\u0435\u0434\u043a\u043e\u0433\u043e \u0431\u0430\u0433\u0430. \u0411\u0430\u0433 \u0431\u044b\u043b \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0431\u0430\u0433 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0442\u0430 \u0441\u0430\u043c\u0430\u044f \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f.", "en": "The compiler removes the call to memset due to a rare bug. The next compiler release fixed it. However, the broken version was used when the bug was discovered.", "fr": "The compiler removes the call to memset due to a rare bug. The next compiler release fixed it. However, the broken version was used when the bug was discovered."}, "value": 0}, {"text": {"ru": "\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 generateDsaKey. \u041e\u043d\u0430 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0431\u0443\u0444\u0435\u0440, \u0438 \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043f\u043e\u0439\u043c\u0438 \u0433\u0434\u0435.", "en": "An error is in the generateDsaKey function. It overflows the buffer, and some data gets lost somewhere.", "fr": "An error is in the generateDsaKey function. It overflows the buffer, and some data gets lost somewhere."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/10-ru_mcafTfn_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/10-en_GdqEVbX_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/10-en_GdqEVbX_thm__218x-.png"}}, {"description": {"ru": "<pre>struct X {<br> int a : 2<br> int b : 2<br>} x;<br>Thread 1:<br>void foo() { x.a = 1 }<br>Thread 2:<br>void boo() { x.b = 1 }\n</pre><p><br></p><p>\n</p><p>\n</p>", "en": "<pre>struct X {<br> int a : 2<br> int b : 2<br>} x;<br>Thread 1:<br>void foo() { x.a = 1 }<br>Thread 2:<br>void boo() { x.b = 1 }\n</pre><p><br></p><p>\n</p><p>\n</p>", "fr": "<pre>struct X {<br> int a : 2<br> int b : 2<br>} x;<br>Thread 1:<br>void foo() { x.a = 1 }<br>Thread 2:<br>void boo() { x.b = 1 }\n</pre><p><br></p><p>\n</p><p>\n</p>"}, "answers": [{"text": {"ru": "\u0417\u0430\u043f\u0438\u0441\u0438 \u0432 \u043f\u043e\u043b\u044f a \u0438 b \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u043c\u0438. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438.", "en": "The entries in the a and b fields are non-atomic. They can be partially executed, and other operations can interrupt them.", "fr": "The entries in the a and b fields are non-atomic. They can be partially executed, and other operations can interrupt them."}, "value": 1}, {"text": {"ru": "\u0418\u0437-\u0437\u0430 \u0431\u0430\u0433\u0430 \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e a \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u0438 b.", "en": "The size of the first field was ignored due to a bug in the compiler. So, if a was written to a variable, b would also be overwritten.", "fr": "The size of the first field was ignored due to a bug in the compiler. So, if a was written to a variable, b would also be overwritten."}, "value": 0}, {"text": {"ru": "\u0417\u0430\u0431\u044b\u043b\u0438, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u0431\u0438\u0442 \u0442\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u043f\u043e\u0434 \u0437\u043d\u0430\u043a, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u0432\u0443\u0445\u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u0435\u043d: [-2..1]. \u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u043b\u044f \u0438\u0437 3 \u0431\u0438\u0442.", "en": "The developers forgot that a character takes one bit, making the value range of two-bit variables insufficient: [-2..1]. They needed to make three-bit fields.", "fr": "The developers forgot that a character takes one bit, making the value range of two-bit variables insufficient: [-2..1]. They needed to make three-bit fields."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/9-ru_mf04U5l_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/9-en_yj8gUGU_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/9-en_yj8gUGU_thm__218x-.png"}}, {"description": {"ru": "<pre>const size_t maxThreads = 10;<br>void fill_texture_mt(int thread_id, std::mutex *pm) {<br> std::lock_guard<std::mutex> lk(*pm);<br> // Access data protected by the lock.<br>}<br>void prepare_texture() {<br> std::thread threads[maxThreads];<br> std::mutex m;<br> for (size_t i = 0; i < maxThreads; ++i) {<br> threads[i] = std::thread(fill_texture_mt, i, &m);<br> }<br>}\n</pre><p><br></p><p> \n</p><p> \n</p><p> \n</p><p> \n</p>", "en": "<pre>const size_t maxThreads = 10;\nvoid fill_texture_mt(int thread_id, std::mutex *pm) {\n std::lock_guard<std::mutex> lk(*pm);\n // Access data protected by the lock.\n}\nvoid prepare_texture() {\n std::thread threads[maxThreads];\n std::mutex m;\n for (size_t i = 0; i < maxThreads; ++i) {\n threads[i] = std::thread(fill_texture_mt, i, &m);\n }\n}\n</pre><p><br></p><p> \n</p><p> \n</p><p> \n</p><p> \n</p>", "fr": "<pre>const size_t maxThreads = 10;\nvoid fill_texture_mt(int thread_id, std::mutex *pm) {\n std::lock_guard<std::mutex> lk(*pm);\n // Access data protected by the lock.\n}\nvoid prepare_texture() {\n std::thread threads[maxThreads];\n std::mutex m;\n for (size_t i = 0; i < maxThreads; ++i) {\n threads[i] = std::thread(fill_texture_mt, i, &m);\n }\n}\n</pre><p><br></p><p> \n</p><p> \n</p><p> \n</p><p> \n</p>"}, "answers": [{"text": {"ru": "\u0412\u044b\u0431\u0440\u0430\u043d \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a.", "en": "The wrong default class was selected for implementing locks.", "fr": "The wrong default class was selected for implementing locks."}, "value": 0}, {"text": {"ru": "\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043c\u044c\u044e\u0442\u0435\u043a\u0441 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 prepare_texture, \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.", "en": "There is no waiting for threads to be completed. Therefore, the mutex is removed once the prepare_texture function finishes, and no thread locking occurs.", "fr": "There is no waiting for threads to be completed. Therefore, the mutex is removed once the prepare_texture function finishes, and no thread locking occurs."}, "value": 1}, {"text": {"ru": "\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0432\u0441\u0451 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0414\u0440\u0443\u0433\u043e\u0435 \u0434\u0435\u043b\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f. \u041d\u043e \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u0430.", "en": "The above code is correct. However, this type of parallelization is inefficient, but that's a different story.", "fr": "The above code is correct. However, this type of parallelization is inefficient, but that's a different story."}, "value": 0}, {"text": {"ru": "\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f m \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c volatile.", "en": "We need to declare the m variable with the volatile specifier.", "fr": "We need to declare the m variable with the volatile specifier."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/9-ru_rgI6o2m_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/9-en_YqG8jfa_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/9-en_YqG8jfa_thm__218x-.png"}}, {"description": {"ru": "<pre>int var_add(int first, int second, ...) {<br> int r = first + second; <br> va_list va;<br> va_start(va, second);<br> while (int v = va_arg(va, int)) {<br> r += v;<br> }<br> va_end(va);<br> return r;<br>}\n</pre><p><br></p>", "en": "<pre>int var_add(int first, int second, ...) {<br> int r = first + second; <br> va_list va;<br> va_start(va, second);<br> while (int v = va_arg(va, int)) {<br> r += v;<br> }<br> va_end(va);<br> return r;<br>}\n</pre><p><br></p>", "fr": "<pre>int var_add(int first, int second, ...) {<br> int r = first + second; <br> va_list va;<br> va_start(va, second);<br> while (int v = va_arg(va, int)) {<br> r += v;<br> }<br> va_end(va);<br> return r;<br>}\n</pre><p><br></p>"}, "answers": [{"text": {"ru": "\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 va \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 r.", "en": "The declaration of the va variable should come right at the beginning of the function, before the r variable.", "fr": "The declaration of the va variable should come right at the beginning of the function, before the r variable."}, "value": 0}, {"text": {"ru": "\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c 0. \u0418\u043d\u0430\u0447\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435.", "en": "The last function parameter should be 0. Otherwise, undefined behavior occurs.", "fr": "The last function parameter should be 0. Otherwise, undefined behavior occurs."}, "value": 0}, {"text": {"ru": "\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043a\u0440\u043e\u043c\u0435 int \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e.", "en": "Passing any type other than int results in undefined behavior.", "fr": "Passing any type other than int results in undefined behavior."}, "value": 0}, {"text": {"ru": "\u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432\u0435\u0440\u043d\u044b 2 \u0438 3.", "en": "Options 2 and 3 are both correct.", "fr": "Options 2 and 3 are both correct."}, "value": 1}, {"text": {"ru": "\u041f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d. \u041e\u0448\u0438\u0431\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0439 \u0438\u0437\u0432\u043d\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437-\u0437\u0430 \u0438\u0433\u0440 \u0441 \u043c\u0430\u043a\u0440\u043e\u0441\u0430\u043c\u0438).", "en": "The code fragment is correct. An error is external (for example, if somebody has tampered with macros).", "fr": "The code fragment is correct. An error is external (for example, if somebody has tampered with macros)."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/7-ru_WxVv5p1_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/7-en_Q4MnWj4_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/7-en_Q4MnWj4_thm__218x-.png"}}, {"description": {"ru": "<pre>static std::mutex m;<br>static int shared_resource = 0;<br>void increment_by_42() {<br> std::unique_lock<std::mutex>(m);<br> shared_resource += 42;<br>}\n</pre><p><br></p><p> \n</p>", "en": "<pre>static std::mutex m;<br>static int shared_resource = 0;<br>void increment_by_42() {<br> std::unique_lock<std::mutex>(m);<br> shared_resource += 42;<br>}\n</pre><p><br></p><p> \n</p>", "fr": "<pre>static std::mutex m;<br>static int shared_resource = 0;<br>void increment_by_42() {<br> std::unique_lock<std::mutex>(m);<br> shared_resource += 42;<br>}\n</pre><p><br></p><p> \n</p>"}, "answers": [{"text": {"ru": "\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0443, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e shared_resource \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043a\u0430\u043a volatile.", "en": "Despite the locking, developers need to declare the shared_resource variable as volatile.", "fr": "Despite the locking, developers need to declare the shared_resource variable as volatile."}, "value": 0}, {"text": {"ru": "\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0438 \u0442\u0443\u0442 \u0436\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u0442\u0443\u0442 \u0436\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442\u0441\u044f, \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.", "en": "An anonymous object is created and destroyed right away. No locking occurs because it's immediately destroyed.", "fr": "An anonymous object is created and destroyed right away. No locking occurs because it's immediately destroyed."}, "value": 0}, {"text": {"ru": "\u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441 \u0438\u043c\u0435\u043d\u0435\u043c m, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u044c\u044e\u0442\u0435\u043a\u0441 \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.", "en": "A new variable named m is created here, it's initialized by default. So, the mutex isn't captured.", "fr": "A new variable named m is created here, it's initialized by default. So, the mutex isn't captured."}, "value": 1}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/6-ru_EYEf15h_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/6-en_3n846So_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/6-en_3n846So_thm__218x-.png"}}, {"description": {"ru": "<pre>struct AreaCrc32 {<br> unsigned char buffType = 0;<br> int crc = 0;<br>};<br>AreaCrc32 s1 {};<br>AreaCrc32 s2 {};<br>void similarArea(const AreaCrc32 &s1, const AreaCrc32 &s2) {<br> if (!std::memcmp(&s1, &s2, sizeof(AreaCrc32))) {<br> // ....<br> }<br>}\n</pre><p><br></p><p>\n</p><p>\n</p>", "en": "<pre>struct AreaCrc32 {<br> unsigned char buffType = 0;<br> int crc = 0;<br>};<br>AreaCrc32 s1 {};<br>AreaCrc32 s2 {};<br>void similarArea(const AreaCrc32 &s1, const AreaCrc32 &s2) {<br> if (!std::memcmp(&s1, &s2, sizeof(AreaCrc32))) {<br> // ....<br> }<br>}\n</pre><p><br></p><p>\n</p><p>\n</p>", "fr": "<pre>struct AreaCrc32 {<br> unsigned char buffType = 0;<br> int crc = 0;<br>};<br>AreaCrc32 s1 {};<br>AreaCrc32 s2 {};<br>void similarArea(const AreaCrc32 &s1, const AreaCrc32 &s2) {<br> if (!std::memcmp(&s1, &s2, sizeof(AreaCrc32))) {<br> // ....<br> }<br>}\n</pre><p><br></p><p>\n</p><p>\n</p>"}, "answers": [{"text": {"ru": "\u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e. \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0430. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043e\u0442\u0440\u0438\u0446\u0430\u043d\u0438\u044f (!) \u043b\u0438\u0448\u043d\u0438\u0439.", "en": "The answer is simple: it's a typo. The negation operator (!) is redundant.", "fr": "The answer is simple: it's a typo. The negation operator (!) is redundant."}, "value": 0}, {"text": {"ru": "\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u043b\u0435\u0439 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435.", "en": "The issue relates to the field alignment in the structure.", "fr": "The issue relates to the field alignment in the structure."}, "value": 1}, {"text": {"ru": "\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.", "en": "The pointer size is calculated instead of the structure size.", "fr": "The pointer size is calculated instead of the structure size."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/5-ru_VA5tjhv_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/5-en_qZygAsE_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/5-en_qZygAsE_thm__218x-.png"}}, {"description": {"ru": "<pre>struct S { S(const S *) noexcept; /* ... */ };<br>class T {<br> int n;<br> S *s1;<br>public:<br> T(const T &rhs) : n(rhs.n),<br> s1(rhs.s1 ? new S(rhs.s1) : nullptr) {}<br> ~T() { delete s1; }<br> // ...<br> T& operator=(const T &rhs) {<br> n = rhs.n;<br> delete s1;<br> s1 = new S(rhs.s1);<br> return *this;<br> }<br>};\n</pre><p><br></p><p> \n</p><p> \n</p><p> \n</p><p> \n</p>", "en": "<pre>struct S { S(const S *) noexcept; /* ... */ };<br>class T {<br> int n;<br> S *s1;<br>public:<br> T(const T &rhs) : n(rhs.n),<br> s1(rhs.s1 ? new S(rhs.s1) : nullptr) {}<br> ~T() { delete s1; }<br> // ...<br> T& operator=(const T &rhs) {<br> n = rhs.n;<br> delete s1;<br> s1 = new S(rhs.s1);<br> return *this;<br> }<br>};\n</pre><p><br></p><p> \n</p><p> \n</p><p> \n</p><p> \n</p>", "fr": "<pre>struct S { S(const S *) noexcept; /* ... */ };<br>class T {<br> int n;<br> S *s1;<br>public:<br> T(const T &rhs) : n(rhs.n),<br> s1(rhs.s1 ? new S(rhs.s1) : nullptr) {}<br> ~T() { delete s1; }<br> // ...<br> T& operator=(const T &rhs) {<br> n = rhs.n;<br> delete s1;<br> s1 = new S(rhs.s1);<br> return *this;<br> }<br>};\n</pre><p><br></p><p> \n</p><p> \n</p><p> \n</p><p> \n</p>"}, "answers": [{"text": {"ru": "\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c return rhs;", "en": "Writing return rhs would be more correct.", "fr": "Writing return rhs would be more correct."}, "value": 0}, {"text": {"ru": "\u0412 operator = \u043d\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u044b, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c \u0441\u0435\u0431\u0435.", "en": "There is no protection against assigning the object to itself in operator =.", "fr": "There is no protection against assigning the object to itself in operator =."}, "value": 0}, {"text": {"ru": "\u0412 operator = \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u043d\u0443\u043b\u0438\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c s1 \u043f\u043e\u0441\u043b\u0435 delete s1;. \u0418\u043d\u0430\u0447\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u0432\u043e\u0439\u043d\u043e\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438.", "en": "You need to zeroize the s1 pointer after delete s1; in operator =. Otherwise, the double free may occur.", "fr": "You need to zeroize the s1 pointer after delete s1; in operator =. Otherwise, the double free may occur."}, "value": 0}, {"text": {"ru": "\u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e 2 \u0438 3.", "en": "Options 2 and 3 are both correct.", "fr": "Options 2 and 3 are both correct."}, "value": 1}, {"text": {"ru": "\u0415\u0441\u043b\u0438 \u044d\u0442\u043e 64-\u0431\u0438\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043f\u043e\u043c\u0435\u043d\u044f\u0432 \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u043f\u043e\u043b\u044f n \u0438 s1. \u0420\u0430\u0437\u043c\u0435\u0440 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u0441\u044f \u0441 16 \u0434\u043e 12 \u0431\u0430\u0439\u0442.", "en": "If it's a 64-bit application, you can lower the size of the structure by swapping the n and s1 fields. The size will decrease from 16 bytes to 12 bytes.", "fr": "If it's a 64-bit application, you can lower the size of the structure by swapping the n and s1 fields. The size will decrease from 16 bytes to 12 bytes."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/5-ru_HDnuCNi_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/5-en_cvRGnUF_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/5-en_cvRGnUF_thm__218x-.png"}}, {"description": {"ru": "<pre>// header a.h<br>constexpr inline const char* super_secret(void) {<br> constexpr const char *STRING = \"string\";<br> return STRING;<br>}<br>// somewhere in a.dll<br>if (super_secret() == saved_string_ptr)<br>// somewhere in b.dll<br>if (super_secret() != saved_string_ptr)\n</pre><p><br></p><p>\n</p><p>\n</p>", "en": "<pre>// header a.h<br>constexpr inline const char* super_secret(void) {<br> constexpr const char *STRING = \"string\";<br> return STRING;<br>}<br>// somewhere in a.dll<br>if (super_secret() == saved_string_ptr)<br>// somewhere in b.dll<br>if (super_secret() != saved_string_ptr)\n</pre><p><br></p><p>\n</p><p>\n</p>", "fr": "<pre>// header a.h<br>constexpr inline const char* super_secret(void) {<br> constexpr const char *STRING = \"string\";<br> return STRING;<br>}<br>// somewhere in a.dll<br>if (super_secret() == saved_string_ptr)<br>// somewhere in b.dll<br>if (super_secret() != saved_string_ptr)\n</pre><p><br></p><p>\n</p><p>\n</p>"}, "answers": [{"text": {"ru": "\u0420\u0430\u0437 \u044d\u0442\u043e \u0432 h-\u0444\u0430\u0439\u043b\u0435, \u0442\u043e \u0436\u0434\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 DLL. \u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0442\u0440\u043e\u043a\u0438.", "en": "It's in the h-file, so using this function in different DLLs can be problematic. Each DLL has its own string instance.", "fr": "It's in the h-file, so using this function in different DLLs can be problematic. Each DLL has its own string instance."}, "value": 1}, {"text": {"ru": "\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u0438 \u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0412\u0435\u0440\u043d\u0435\u0435, \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e.", "en": "The function returns a pointer to a temporary line, and the pointer can't be used. Or rather, the use of it leads to undefined behavior.", "fr": "The function returns a pointer to a temporary line, and the pointer can't be used. Or rather, the use of it leads to undefined behavior."}, "value": 0}, {"text": {"ru": "constexpr \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 static.", "en": "We need to replace constexpr with static.", "fr": "We need to replace constexpr with static."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/4-ru_9YSHhY3_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/4-en_9zaQ594_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/4-en_9zaQ594_thm__218x-.png"}}, {"description": {"ru": "<pre>char destBuffer[16];<br>void serialize(bool x) {<br> const char* whichString = x ? \"true\" : \"false\";<br> const size_t len = strlen(whichString);<br> memcpy(destBuffer, whichString, len);<br>}<br>int main() {<br> bool x;<br> serialize(x);<br> printf(\"%s\", destBuffer);<br> return 0;<br>}\n</pre><p><br></p><p>\n</p>", "en": "<pre>char destBuffer[16];<br>void serialize(bool x) {<br> const char* whichString = x ? \"true\" : \"false\";<br> const size_t len = strlen(whichString);<br> memcpy(destBuffer, whichString, len);<br>}<br>int main() {<br> bool x;<br> serialize(x);<br> printf(\"%s\", destBuffer);<br> return 0;<br>}\n</pre><p><br></p><p>\n</p>", "fr": "<pre>char destBuffer[16];<br>void serialize(bool x) {<br> const char* whichString = x ? \"true\" : \"false\";<br> const size_t len = strlen(whichString);<br> memcpy(destBuffer, whichString, len);<br>}<br>int main() {<br> bool x;<br> serialize(x);<br> printf(\"%s\", destBuffer);<br> return 0;<br>}\n</pre><p><br></p><p>\n</p>"}, "answers": [{"text": {"ru": "\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f x \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043b\u044e\u0447\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0444\u0430\u0437\u044b \u041b\u0443\u043d\u044b \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0442\u043e \"true\", \u0442\u043e \"false\".", "en": "Since the x variable is not initialized, the program outputs \"true\" or \"false\" depending on the optimization keys and moon phase.", "fr": "Since the x variable is not initialized, the program outputs \"true\" or \"false\" depending on the optimization keys and moon phase."}, "value": 0}, {"text": {"ru": "\u0418\u0437-\u0437\u0430 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \"true\", \"false\", \u043d\u043e \u0435\u0449\u0451 \u0438 \u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430.", "en": "Not only \"true\" or \"false\", but also an empty string can show up due to undefined behavior.", "fr": "Not only \"true\" or \"false\", but also an empty string can show up due to undefined behavior."}, "value": 0}, {"text": {"ru": "\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f.", "en": "The code doesn't compile.", "fr": "The code doesn't compile."}, "value": 0}, {"text": {"ru": "\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 x \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e. \u041a\u0430\u043a \u043e\u043d\u043e \u0441\u0435\u0431\u044f \u043f\u0440\u043e\u044f\u0432\u0438\u0442, \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u0441\u043c\u044b\u0441\u043b\u0430 \u043d\u0435\u0442. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0443\u043f\u0430\u0441\u0442\u044c, \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u043c\u0443\u0441\u043e\u0440, \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e.", "en": "Using the uninitialized x variable results in undefined behavior. There's no point in discussing what the outcome can be. The program can crash or display garbage \u2014 anything is possible.", "fr": "Using the uninitialized x variable results in undefined behavior. There's no point in discussing what the outcome can be. The program can crash or display garbage \u2014 anything is possible."}, "value": 1}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/3-ru_ix7I1LR_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/3-en_FS6X3v8_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/3-en_FS6X3v8_thm__218x-.png"}}, {"description": {"ru": "<pre>void sayHello() {<br> std::cout << \"Hello, World!\\n\";<br>}<br>void sayHello() {<br> std::cout << \"Goodbye, World!\\n\";<br>}<br>int main() {<br> sayHello();<br> return 0;<br>}\n</pre><p><br></p>", "en": "<pre>void sayHello() {<br> std::cout << \"Hello, World!\\n\";<br>}<br>void sayHello() {<br> std::cout << \"Goodbye, World!\\n\";<br>}<br>int main() {<br> sayHello();<br> return 0;<br>}\n</pre><p><br></p>", "fr": "<pre>void sayHello() {<br> std::cout << \"Hello, World!\\n\";<br>}<br>void sayHello() {<br> std::cout << \"Goodbye, World!\\n\";<br>}<br>int main() {<br> sayHello();<br> return 0;<br>}\n</pre><p><br></p>"}, "answers": [{"text": {"ru": "\u041d\u0435 \u043c\u043e\u0440\u043e\u0447\u044c\u0442\u0435 \u043c\u043d\u0435 \u0433\u043e\u043b\u043e\u0432\u0443. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f.", "en": "Don't mess with my mind. The code doesn't compile.", "fr": "Don't mess with my mind. The code doesn't compile."}, "value": 0}, {"text": {"ru": "\u0411\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u043d\u043e \"Hello, World!\".", "en": "The program will display \"Hello World\".", "fr": "The program will display \"Hello World\"."}, "value": 0}, {"text": {"ru": "\u0411\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u043d\u043e \"Hello, World!\", \u0430 \u043f\u043e\u0442\u043e\u043c \"Goodbye, World!\". \u0415\u0441\u0442\u044c \u0442\u0430\u043a\u0430\u044f \u043c\u0430\u0433\u0438\u044f.", "en": "The program will display \"Hello World\" first, followed by \"Goodbye, World!\". It's a special kind of magic.", "fr": "The program will display \"Hello World\" first, followed by \"Goodbye, World!\". It's a special kind of magic."}, "value": 0}, {"text": {"ru": "\u0422\u0443\u0442 \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043a\u043e\u043b, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0443\u0436\u0435 \u0437\u043d\u0430\u044e. \u0418\u043b\u0438 \u043d\u0435 \u0437\u043d\u0430\u044e, \u043d\u043e \u043f\u0440\u0435\u0434\u0432\u0438\u0436\u0443.", "en": "There is a trick I already know about. Or I don't know it yet but can assume.", "fr": "There is a trick I already know about. Or I don't know it yet but can assume."}, "value": 1}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/3-ru_yMHrC9M_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/3-en_NrulFmX_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/3-en_NrulFmX_thm__218x-.png"}}, {"description": {"ru": "<pre>int abs_legs(int my_legs) {<br> if (my_legs < 0) {<br> return -my_legs;<br> }<br>}\n</pre><p><br></p>", "en": "<pre>int abs_legs(int my_legs) {<br> if (my_legs < 0) {<br> return -my_legs;<br> }<br>}\n</pre><p><br></p>", "fr": "<pre>int abs_legs(int my_legs) {<br> if (my_legs < 0) {<br> return -my_legs;<br> }<br>}\n</pre><p><br></p>"}, "answers": [{"text": {"ru": "\u0427\u0442\u043e \u0442\u0443\u0442 \u0434\u0443\u043c\u0430\u0442\u044c-\u0442\u043e. \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 return \u0432 \u043a\u043e\u043d\u0446\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e.", "en": "What's there to think about? At the end of the function, there is no return which would be executed for non-negative numbers. This results in undefined behavior.", "fr": "What's there to think about? At the end of the function, there is no return which would be executed for non-negative numbers. This results in undefined behavior."}, "value": 1}, {"text": {"ru": "\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0438\u043a\u043e\u0439 \u0431\u0435\u0434\u044b \u043d\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f return \u043a\u043e\u0434 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f.", "en": "Actually, there is nothing wrong at all, as the code will not compile because of the missing return.", "fr": "Actually, there is nothing wrong at all, as the code will not compile because of the missing return."}, "value": 0}, {"text": {"ru": "\u0412\u0441\u0451 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 C++20, \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u044f\u0432\u043d\u043e\u0433\u043e return, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441 \u043e\u0434\u043d\u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442. \u0422.\u0435. \u043a\u0430\u043a \u0440\u0430\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u0435\u0440\u043d\u0451\u0442 my_legs. \u041f\u0440\u0438\u043a\u043e\u043b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0430\u043d\u0435\u0435 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0431\u044b\u043b \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d, \u043d\u043e \u043f\u043e\u0447\u0438\u043d\u0438\u043b\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 C++20.", "en": "Everything is correct. Since C++20, a function with a single argument is assumed to return that argument unless there is an explicit return. That is, the function will simply return my_legs by default. The funny thing is that the code used to be wrong, but was fixed when the developers switched to C++20.", "fr": "Everything is correct. Since C++20, a function with a single argument is assumed to return that argument unless there is an explicit return. That is, the function will simply return my_legs by default. The funny thing is that the code used to be wrong, but was fixed when the developers switched to C++20."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/2-ru_RKd6QvB_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/2-en_DrokZdP_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/2-en_DrokZdP_thm__218x-.png"}}, {"description": {"ru": "<pre>int get_money(int index, const int *pockets) {<br> int a = index + pockets[++index];<br> // ....<br> return a;<br>}\n</pre><p><br></p>", "en": "<pre>int get_money(int index, const int *pockets) {<br> int a = index + pockets[++index];<br> // ....<br> return a;<br>}\n</pre><p><br></p>", "fr": "<pre>int get_money(int index, const int *pockets) {<br> int a = index + pockets[++index];<br> // ....<br> return a;<br>}\n</pre><p><br></p>"}, "answers": [{"text": {"ru": "\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043d\u0435\u0443\u0442\u043e\u0447\u043d\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435.", "en": "We're looking at unspecified behavior.", "fr": "We're looking at unspecified behavior."}, "value": 0}, {"text": {"ru": "\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435.", "en": "It's undefined behavior.", "fr": "It's undefined behavior."}, "value": 1}, {"text": {"ru": "\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 C++17, \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d, \u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043e\u043d \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442.", "en": "Since C++17, this code is correct, and we know what it will compute.", "fr": "Since C++17, this code is correct, and we know what it will compute."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/1-ru_t63WXJs_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/1-en--1-_rSnBJxI_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/1-en--1-_rSnBJxI_thm__218x-.png"}}, {"description": {"ru": "<pre>void umcp_read_buffer_from_pipe() {<br> char bufKernel[12];<br> char bufMatrix[12];<br> std::cin.width(12);<br> std::cin >> bufKernel;<br> std::cin >> bufMatrix;<br>}\n</pre><p><br></p>", "en": "<pre>void umcp_read_buffer_from_pipe() {<br> char bufKernel[12];<br> char bufMatrix[12];<br> std::cin.width(12);<br> std::cin >> bufKernel;<br> std::cin >> bufMatrix;<br>}\n</pre><p><br></p>", "fr": "<pre>void umcp_read_buffer_from_pipe() {<br> char bufKernel[12];<br> char bufMatrix[12];<br> std::cin.width(12);<br> std::cin >> bufKernel;<br> std::cin >> bufMatrix;<br>}\n</pre><p><br></p>"}, "answers": [{"text": {"ru": "\u041d\u0443\u0436\u0435\u043d \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0432\u044b\u0437\u043e\u0432 std::cin.width(12).", "en": "Another call to std::cin.width(12) is needed.", "fr": "Another call to std::cin.width(12) is needed."}, "value": 0}, {"text": {"ru": "\u041a\u043e\u0434 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 C++20.", "en": "The code works correctly starting with C++20.", "fr": "The code works correctly starting with C++20."}, "value": 0}, {"text": {"ru": "\u0412\u0435\u0440\u043d\u044b 1 \u0438 2.", "en": "Options 1 and 2 are both correct.", "fr": "Options 1 and 2 are both correct."}, "value": 1}, {"text": {"ru": "\u042d\u0442\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u0434. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u044b\u0448\u043a\u0438 :)", "en": "The code is correct. It's just an example to take a little breather :)", "fr": "The code is correct. It's just an example to take a little breather :)"}, "value": 0}, {"text": {"ru": "\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c std::cin.width(12-1); \u0447\u0442\u043e\u0431\u044b \u0443\u0447\u0435\u0441\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043b\u044c.", "en": "The correct way would be to write std::cin.width(12-1); to take into account the terminal null.", "fr": "The correct way would be to write std::cin.width(12-1); to take into account the terminal null."}, "value": 0}, {"text": {"ru": "\u042d\u0442\u043e\u0442 \u043a\u043e\u0434, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0432\u0432\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e.", "en": "The code results in undefined behavior regardless of the input data.", "fr": "The code results in undefined behavior regardless of the input data."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/7-ru_ib3Jx2u_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/7-en_IWSDC2B_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/7-en_IWSDC2B_thm__218x-.png"}}, {"description": {"ru": "<pre>std::string str_func();<br>void display_string(const char *);<br>void set_display_options() {<br> const char *str = str_func().c_str();<br> display_string(str);<br>}\n</pre><p><br></p><p>\n</p>", "en": "<pre>std::string str_func();<br>void display_string(const char *);<br>void set_display_options() {<br> const char *str = str_func().c_str();<br> display_string(str);<br>}\n</pre><p><br></p><p>\n</p>", "fr": "<pre>std::string str_func();<br>void display_string(const char *);<br>void set_display_options() {<br> const char *str = str_func().c_str();<br> display_string(str);<br>}\n</pre><p><br></p><p>\n</p>"}, "answers": [{"text": {"ru": "\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442\u0441\u044f, \u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0431\u0443\u0444\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f.", "en": "The temporary string object is destroyed, and the pointer to the buffer can no longer be used.", "fr": "The temporary string object is destroyed, and the pointer to the buffer can no longer be used."}, "value": 1}, {"text": {"ru": "\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 C++11.", "en": "This code doesn't compile since C++11.", "fr": "This code doesn't compile since C++11."}, "value": 0}, {"text": {"ru": "\u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0443\u0441\u0442\u0430\u044f, \u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c str \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u0435\u043d nullptr.", "en": "If the string is empty, the str pointer is nullptr.", "fr": "If the string is empty, the str pointer is nullptr."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/5-ru_ovJ69Lw_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/5-en_hMz3f0F_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/5-en_hMz3f0F_thm__218x-.png"}}, {"description": {"ru": "<pre>void morning(const std::string &owner) {<br> std::fstream bar(owner);<br> if (!bar.is_open()) {<br> // Handle error<br> return;<br> }<br> bar << \"customer\";<br> std::string str;<br> bar >> str;<br>}\n</pre><p><br></p><p>\n</p><p>\n</p>", "en": "<pre>void morning(const std::string &owner) {<br> std::fstream bar(owner);<br> if (!bar.is_open()) {<br> // Handle error<br> return;<br> }<br> bar << \"customer\";<br> std::string str;<br> bar >> str;<br>}\n</pre><p><br></p><p>\n</p><p>\n</p>", "fr": "<pre>void morning(const std::string &owner) {<br> std::fstream bar(owner);<br> if (!bar.is_open()) {<br> // Handle error<br> return;<br> }<br> bar << \"customer\";<br> std::string str;<br> bar >> str;<br>}\n</pre><p><br></p><p>\n</p><p>\n</p>"}, "answers": [{"text": {"ru": "\u0412\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e. \u0417\u0430\u043f\u0438\u0448\u0435\u043c \"customer\" \u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u043c \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435.", "en": "It's fine. Let's write \"customer\" and read the same thing.", "fr": "It's fine. Let's write \"customer\" and read the same thing."}, "value": 0}, {"text": {"ru": "\u041c\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u043c \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 \"\u043f\u0443\u0441\u0442\u043e\u0442\u0443\".", "en": "We'll read the \"void\" from the stream.", "fr": "We'll read the \"void\" from the stream."}, "value": 1}, {"text": {"ru": "\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0447\u0442\u043e \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0442\u043e\u043a.", "en": "The check whether the stream has been opened is implemented incorrectly.", "fr": "The check whether the stream has been opened is implemented incorrectly."}, "value": 0}, {"text": {"ru": "\u041a\u043e\u0434 \u043e\u043f\u0430\u0441\u0435\u043d, \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 -O2.", "en": "The code is dangerous if you enable the -O2 optimization mode.", "fr": "The code is dangerous if you enable the -O2 optimization mode."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/4-ru_qYf6T3H_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/4-en_v46KKfU_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/4-en_v46KKfU_thm__218x-.png"}}, {"description": {"ru": "<pre>class Bard {<br> int _beer;<br> int _meal;<br>public:<br> Bard(int meal) : _meal(meal), _beer(_meal - 1) {}<br>};\n</pre><p><br></p><p>\n</p>", "en": "<pre>class Bard {<br> int _beer;<br> int _meal;<br>public:<br> Bard(int meal) : _meal(meal), _beer(_meal - 1) {}<br>};\n</pre><p><br></p><p>\n</p>", "fr": "<pre>class Bard {<br> int _beer;<br> int _meal;<br>public:<br> Bard(int meal) : _meal(meal), _beer(_meal - 1) {}<br>};\n</pre><p><br></p><p>\n</p>"}, "answers": [{"text": {"ru": "\u041f\u043e\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0441 \u043f\u043e\u0434\u0447\u0451\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u043c \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432.", "en": "You can't start a class field with an underscore character. This leads to unexpected consequences when using some compilers.", "fr": "You can't start a class field with an underscore character. This leads to unexpected consequences when using some compilers."}, "value": 0}, {"text": {"ru": "\u0414\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 _beer \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0435\u0449\u0451 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f _meal.", "en": "The _meal variable, which is not yet initialized, is used to initialize _beer.", "fr": "The _meal variable, which is not yet initialized, is used to initialize _beer."}, "value": 1}, {"text": {"ru": "\u0412\u0441\u0451 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.", "en": "Everything is correct.", "fr": "Everything is correct."}, "value": 0}, {"text": {"ru": "\u0412\u0441\u0451 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f.", "en": "Everything is correct if there can be no inheritance from this class.", "fr": "Everything is correct if there can be no inheritance from this class."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/6-ru_rYhdlv8_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/6-en_gx8KwTm_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/6-en_gx8KwTm_thm__218x-.png"}}, {"description": {"ru": "<pre>std::vector<....> formats;<br>....<br>for (auto format = begin(formats), __end = end(formats);<br> format != __end; ++format)<br>{<br> if (snd::CodecNamesEq(....)) {<br> format->is_stereo = true;<br> formats.push_back(stereo_format);<br> }<br>}</pre><p><br></p>", "en": "<pre>std::vector<....> formats;<br>....<br>for (auto format = begin(formats), __end = end(formats);<br> format != __end; ++format)<br>{<br> if (snd::CodecNamesEq(....)) {<br> format->is_stereo = true;<br> formats.push_back(stereo_format);<br> }<br>}</pre><p><br></p>", "fr": "<pre>std::vector<....> formats;<br>....<br>for (auto format = begin(formats), __end = end(formats);<br> format != __end; ++format)<br>{<br> if (snd::CodecNamesEq(....)) {<br> format->is_stereo = true;<br> formats.push_back(stereo_format);<br> }<br>}</pre><p><br></p>"}, "answers": [{"text": {"ru": "\u0418\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0432\u0430 \u0438\u0434\u0443\u0449\u0438\u0445 \u043f\u043e\u0434\u0440\u044f\u0434 \u043f\u043e\u0434\u0447\u0451\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u044f.", "en": "Variable names should not contain a double underscore.", "fr": "Variable names should not contain a double underscore."}, "value": 0}, {"text": {"ru": "\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 push_back \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u043d\u0443\u0442 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c\u0438.", "en": "After push_back is called, the iterators become invalid.", "fr": "After push_back is called, the iterators become invalid."}, "value": 0}, {"text": {"ru": "\u041d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c format++, \u0430 \u043d\u0435 ++format. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e.", "en": "We need to write format++, not ++format. It's important here.", "fr": "We need to write format++, not ++format. It's important here."}, "value": 0}, {"text": {"ru": "\u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e 1 \u0438 2.", "en": "Options 1 and 2 are both correct.", "fr": "Options 1 and 2 are both correct."}, "value": 1}, {"text": {"ru": "\u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e 1, 2 \u0438 3.", "en": "Options 1, 2, and 3 are correct.", "fr": "Options 1, 2, and 3 are correct."}, "value": 0}], "image": {"ru": "https://cdn.pvs-studio.com/media/quest/10-ru_vYXuEm4_thm__218x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/10-en_gU9JNc8_thm__218x-.png", "en": "https://cdn.pvs-studio.com/media/quest/10-en_gU9JNc8_thm__218x-.png"}}], "results": [{"token": "98f13708210194c475687be6106a3b84", "score": 4, "image": {"ru": "https://cdn.pvs-studio.com/media/quest/June_mIkOp11_thm__300x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/June_9DpILrk_thm__300x-.png", "en": "https://cdn.pvs-studio.com/media/quest/June_9DpILrk_thm__300x-.png"}, "title": {"ru": "\u041d\u043e\u0432\u0438\u0447\u043e\u043a", "en": "Rookie", "fr": "Rookie"}, "description": {"ru": "<p>\u0422\u044b \u0435\u0449\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435. \u041d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e — \u0441\u043a\u043e\u0440\u043e \u0442\u044b \u0441\u0442\u0430\u043d\u0435\u0448\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c \u043f\u0440\u043e\u0444\u0438 \u0432 \u044d\u0442\u043e\u043c \u0434\u0435\u043b\u0435!</p>\r\n<p>\u0410 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u044d\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0438 \u043a\u0430\u043a \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c — \u043c\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0421\u0435\u0440\u0433\u0435\u0435\u043c \u041a\u0443\u0448\u043d\u0438\u0440\u0435\u043d\u043a\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0434\u043b\u044f \u0432\u0430\u0441 \u0441\u0442\u0430\u0442\u044c\u044e-\u0440\u0430\u0437\u0431\u043e\u0440 \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438. \u0417\u0430\u0445\u043e\u0434\u0438\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c!</p>", "en": "<p>You're just starting your bug-hunting career. But that's okay — a little bit of practice and you'll become a pro in no time!</p>\r\n<p>And if you want to see all correct answers as well as the history of these errors and how to fix them — read <a href=\"https://pvs-studio.com/en/blog/posts/cpp/1091/\">this article</a>. The PVS-Studio team and Sergei Kushirenko will explain every answer in detail. Welcome!</p>", "fr": "<p>You're just starting your bug-hunting career. But that's okay — a little bit of practice and you'll become a pro in no time!</p>\r\n<p>And if you want to see all correct answers as well as the history of these errors and how to fix them — read <a href=\"https://pvs-studio.com/en/blog/posts/cpp/1091/\">this article</a>. The PVS-Studio team and Sergei Kushirenko will explain every answer in detail. Welcome!</p>"}}, {"token": "3c59dc048e8850243be8079a5c74d079", "score": 9, "image": {"ru": "https://cdn.pvs-studio.com/media/quest/res3_pNLea2j_thm__300x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/res3_YMPvPoa_thm__300x-.png", "en": "https://cdn.pvs-studio.com/media/quest/res3_YMPvPoa_thm__300x-.png"}, "title": {"ru": "\u041e\u043f\u044b\u0442\u043d\u044b\u0439", "en": "Experienced", "fr": "Experienced"}, "description": {"ru": "<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u0435\u0440\u0432\u0430\u044f \u0442\u0432\u043e\u044f \u043e\u0445\u043e\u0442\u0430 \u0437\u0430 \u0431\u0430\u0433\u0430\u043c\u0438! \u041d\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0430\u0433\u0438 \u0435\u0449\u0435 \u043f\u0440\u044f\u0447\u0443\u0442\u0441\u044f \u0432\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0445 \u043a\u043e\u0434\u0430. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043d\u043e\u0440\u043e\u0432\u043a\u0438, \u0438 \u0442\u044b \u0441\u043c\u043e\u0436\u0435\u0448\u044c \u043d\u0430\u0439\u0442\u0438 \u0438\u0445 \u0432\u0441\u0435\u0445!</p>\r\n<p>\u0410 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u044d\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0438 \u043a\u0430\u043a \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c — \u043c\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0421\u0435\u0440\u0433\u0435\u0435\u043c \u041a\u0443\u0448\u043d\u0438\u0440\u0435\u043d\u043a\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0434\u043b\u044f \u0432\u0430\u0441 <a href=\"https://pvs-studio.ru/ru/blog/posts/cpp/1091/\">\u0441\u0442\u0430\u0442\u044c\u044e-\u0440\u0430\u0437\u0431\u043e\u0440</a> \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438. \u0417\u0430\u0445\u043e\u0434\u0438\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c!</p>", "en": "<p>It's clearly not your first bug hunt! But many of them are still hiding in the code. Try again to find them!</p>\r\n<p>And if you want to see all correct answers as well as the history of these errors and how to fix them — read <a href=\"https://pvs-studio.com/en/blog/posts/cpp/1091/\">this article</a>. The PVS-Studio team and Sergei Kushirenko will explain every answer in detail. Welcome!</p>", "fr": "<p>It's clearly not your first bug hunt! But many of them are still hiding in the code. Try again to find them!</p>\r\n<p>And if you want to see all correct answers as well as the history of these errors and how to fix them — read <a href=\"https://pvs-studio.com/en/blog/posts/cpp/1091/\">this article</a>. The PVS-Studio team and Sergei Kushirenko will explain every answer in detail. Welcome!</p>"}}, {"token": "b6d767d2f8ed5d21a44b0e5886680cb9", "score": 14, "image": {"ru": "https://cdn.pvs-studio.com/media/quest/Pro_EIGxePw_thm__300x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/Pro_FPa0onc_thm__300x-.png", "en": "https://cdn.pvs-studio.com/media/quest/Pro_FPa0onc_thm__300x-.png"}, "title": {"ru": "\u042d\u043a\u0441\u043f\u0435\u0440\u0442", "en": "Expert", "fr": "Expert"}, "description": {"ru": "<p>\u041e\u0433\u043e, \u0434\u0430 \u0442\u044b \u043c\u0430\u0441\u0442\u0435\u0440 \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u043e\u0448\u0438\u0431\u043e\u043a! \u041d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0435 \u0436\u0435 \u0443\u0441\u043a\u043e\u043b\u044c\u0437\u043d\u0443\u043b\u0438 \u043e\u0442 \u0442\u0432\u043e\u0435\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u0448\u044c \u043d\u0430\u0439\u0442\u0438 \u0438\u0445 \u0432\u0441\u0435\u0445?</p>\r\n<p>\u0410 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u044d\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0438 \u043a\u0430\u043a \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c — \u043c\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0421\u0435\u0440\u0433\u0435\u0435\u043c \u041a\u0443\u0448\u043d\u0438\u0440\u0435\u043d\u043a\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0434\u043b\u044f \u0432\u0430\u0441 <a href=\"https://pvs-studio.ru/ru/blog/posts/cpp/1091/\">\u0441\u0442\u0430\u0442\u044c\u044e-\u0440\u0430\u0437\u0431\u043e\u0440</a> \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438. \u0417\u0430\u0445\u043e\u0434\u0438\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c!</p>", "en": "<p>Wow, you're a professional bug finder! However, some are still left unnoticed. Will you try again?</p>\r\n<p>And if you want to see all correct answers as well as the history of these errors and how to fix them — read <a href=\"https://pvs-studio.com/en/blog/posts/cpp/1091/\">this article</a>. The PVS-Studio team and Sergei Kushirenko will explain every answer in detail. Welcome!</p>", "fr": "<p>Wow, you're a professional bug finder! However, some are still left unnoticed. Will you try again?</p>\r\n<p>And if you want to see all correct answers as well as the history of these errors and how to fix them — read <a href=\"https://pvs-studio.com/en/blog/posts/cpp/1091/\">this article</a>. The PVS-Studio team and Sergei Kushirenko will explain every answer in detail. Welcome!</p>"}}, {"token": "37693cfc748049e45d87b8c7d8b9aacd", "score": 18, "image": {"ru": "https://cdn.pvs-studio.com/media/quest/res4_UsGZsO0_thm__300x-.png", "fr": "https://cdn.pvs-studio.com/media/quest/res4_lpBbjgL_thm__300x-.png", "en": "https://cdn.pvs-studio.com/media/quest/res4_lpBbjgL_thm__300x-.png"}, "title": {"ru": "\u041f\u0440\u043e\u0444\u0438", "en": "Professional", "fr": "Professional"}, "description": {"ru": "<p>\u0411\u0440\u0430\u0432\u043e! \u0422\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a. \u041d\u0438 \u043e\u0434\u0438\u043d \u0431\u0430\u0433 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u043a\u043e\u043b\u044c\u0437\u043d\u0443\u0442\u044c \u043e\u0442 \u0442\u0432\u043e\u0435\u0433\u043e \u0437\u043e\u0440\u043a\u043e\u0433\u043e \u0432\u0437\u0433\u043b\u044f\u0434\u0430. \u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u0435\u043c!</p>\r\n<p>\u0410 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u044d\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0438 \u043a\u0430\u043a \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c — \u043c\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0421\u0435\u0440\u0433\u0435\u0435\u043c \u041a\u0443\u0448\u043d\u0438\u0440\u0435\u043d\u043a\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0434\u043b\u044f \u0432\u0430\u0441 <a href=\"https://pvs-studio.ru/ru/blog/posts/cpp/1091/\">\u0441\u0442\u0430\u0442\u044c\u044e-\u0440\u0430\u0437\u0431\u043e\u0440</a> \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438. \u0417\u0430\u0445\u043e\u0434\u0438\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c!</p>", "en": "<p>You showed some fantastic skills! No bug can hide from your watchful eye. Congratulations!</p>\r\n<p>And if you want to see all correct answers as well as the history of these errors and how to fix them — read <a href=\"https://pvs-studio.com/en/blog/posts/cpp/1091/\">this article</a>. The PVS-Studio team and Sergei Kushirenko will explain every answer in detail. Welcome!</p>", "fr": "<p>You showed some fantastic skills! No bug can hide from your watchful eye. Congratulations!</p>\r\n<p>And if you want to see all correct answers as well as the history of these errors and how to fix them — read <a href=\"https://pvs-studio.com/en/blog/posts/cpp/1091/\">this article</a>. The PVS-Studio team and Sergei Kushirenko will explain every answer in detail. Welcome!</p>"}}]}
True