Search⌘ K
AI Features

Say It Again—Or Not

Explore the logic and output of a C coding puzzle designed to test your understanding. Learn to analyze code carefully and predict results, improving your problem-solving skills and code comprehension.

We'll cover the following...

Puzzle code

Read carefully the code given below:

C
#include <stdio.h>
int main()
{
int a = 11;
do
{
printf("a = %d\n", a);
a--;
}
while(a<10);
return(0);
}

Your task: Guess the output

Attempt the following test to assess your understanding.

Technical Quiz
1.

What is the expected output of the above code?

A.

a = 8

B.

a = 9

C.

a = 10

D.

a = 11


1 / 1

Let's discuss the code and output together in the next lesson.