the following program should print “error,” but printing it successfully .why?
#include<iostream> using namespace std; int main() { unsigned int a; a=-10; if(a == -10) cout << "success" ; else cout << "error" ; return 0; }
The conversion for comparison makes them equal again. But this should make the compiler issue a warning.
Source: https://habr.com/ru/post/1778047/More articles:How to avoid duplicates when inserting contacts in Android 2.2? - androidкак я могу проверить, существует ли таблица в базе данных (ACCESS или SQL) в С# - c#Adding a JSP file to a GWT project in Eclipse Helios (and Galileo) - eclipseCron task to delete files created before a certain time - linuxУстановка фермы CakePHP с высокой доступностью - linuxAutoMapper and reflection - reflectionОшибка LNK1104: невозможно открыть файл 'python27.lib' PyISAPIe - wsgiHow do two ASP.NET_SessionId cookies appear unexpectedly in a cookie list? - asp.net-mvcSHA1 Hash on a hexadecimal string - javaService Timer Notification - androidAll Articles