Welcome to C! Tiny suggestion to add to other comments: value is already Boolean, so there’s no need to write if (value == 1), you can just write if (value). Similarly, following @chamaeleon@kbin.social’s suggestion of using the ternary operator, you can write return value ? "Yes" : "No";.
Welcome to C! Tiny suggestion to add to other comments:
value
is already Boolean, so there’s no need to writeif (value == 1)
, you can just writeif (value)
. Similarly, following @chamaeleon@kbin.social’s suggestion of using the ternary operator, you can writereturn value ? "Yes" : "No";
.