Always getting true in C

Here’s my simple program

char *array = 1==1;
if((bool)array == true)
printf("true");

Output: true

but when i change the array in

*array = 1==2;
Output: true

Obviously there is no should be an Output, idunno why it always true.


Source: c#

Leave a Reply