int i =2, j = 1;
printf("%d", !!i + !j);
Working on exercises from my c book.
I know the output is 1... not sure why. I read this would be called a cast type for bool. Is the !i = 1 and the !j = 1 and since 1 = true for bool, then the value is 1?
How does the double negative work?