Link Search Menu Expand Document

Below is our example code using printf.

#include <stdio.h>

int main() {
    printf("this125A$©§");
    printf("asd \n \t");
    printf("\n\n");

    int x = -2130;
    printf("Number: %d <-- like this!\n", x);    
    printf("Number: %o <-- like this!\n", x);    
    printf("Number: %u <-- like this!\n", x);    
    printf("Number: %x <-- like this!\n", x);    
    printf("Number: %X <-- like this!\n", x);    

    printf("%d + %d = %d (%s)\n", 7, 3, 7+3, "yay");
}

Copyright © 2022 John Hott, portions Luther Tychonievich.
Released under the CC-BY-NC-SA 4.0 license.
Creative Commons License