RosettaCodeData/Task/Boolean-values/Little/boolean-values.little
2023-07-01 13:44:08 -04:00

12 lines
533 B
Text

int a = 0;
int b = 1;
int c;
string str1 = "initialized string";
string str2; // "uninitialized string";
if (a) {puts("first test a is false");} // This should not print
if (b) {puts("second test b is true");} // This should print
if (c) {puts("third test b is false");} // This should not print
if (!defined(c)) {puts("fourth test is true");} // This should print
if (str1) {puts("fifth test str1 is true");} // This should print
if (str2) {puts("sixth test str2 is false");} // This should not print