Categories
2. Input and Output

Integer Output

#include <stdio.h>
int main()
{
    int testInteger = 5;
    printf("Number = %d", testInteger);
    return 0;
}

Output

Number = 5

We use %d format specifier to print int types. Here, the %d inside the quotations will be replaced by the value of testInteger.

Leave a Reply

Your email address will not be published. Required fields are marked *