Potato Gamer
last year
Potatocountry asked

What is count++?

Abhilekh Gautam
Expert
last year

In this code:

#include 

int main() {

    int count = 1;

    while (count <= 3) {
        printf(""I am inside a loop.\n"");

        count++;
    }
  
    return 0;
}

count++ increments the value of the count variable by 1.

Just note that count++ is a shorthand for count = count + 1.

If you have more questions, feel free to ask.

C
This question was asked as part of the Learn C Programming course.