Assessment
What is the output of this program? #include int main() { f…
What is the output of this program? #include int main() { for (int i = 0; i < 3; i++) { printf("%d ", i); } return 0; }
What is the output of this program? #include int main() { f…
What is the output of this program? #include int main() { for (int i = 0; i < 5; i++) { if (i == 3) { continue; } printf("%d\n", i); } return 0; }
The break statement can be used in both switch and loop stat…
The break statement can be used in both switch and loop statements.
What is the output of this program? #include int main() { i…
What is the output of this program? #include int main() { int x = 2; switch (x) { case 1: printf(“zebra\n”); break; case 2: printf(“anteater\n”); break; case 3: printf(“lion\n”); break; default: printf(“elephant\n”); } return 0; }
What is the output of this program? #include int main() { i…
What is the output of this program? #include int main() { int x = 10; x /= 2; printf(“%d\n”, x); return 0; }
What is the output of this program? #include int main() { i…
What is the output of this program? #include int main() { int a = 5, b = 10; int result = (a >= b) ? 1 : 0; printf(“%d\n”, result); return 0; }
What is the purpose of the ‘case’ keyword in a ‘switch’ stat…
What is the purpose of the ‘case’ keyword in a ‘switch’ statement?
Which of the following is a valid floating-point constant in…
Which of the following is a valid floating-point constant in C?
What is the output of this program? #include int main() { i…
What is the output of this program? #include int main() { int x = 10; x %= 3; printf(“%d\n”, x); return 0; }