Content health: prewriting stage
This chapter is not yet finished. To speed up the progress, help us fix it at GitHub.

Variables, constants, and types


Variable is used to store some value in your program.

#include <stdio.h>

int main() {
    int foo = 12;
    int bar = 56;
    int sum;
    sum = foo + bar;
    printf("%d + %d = %d\n", foo, bar, sum);
    return 0;

Found a typo? Something wrong with this content?

Just fork and edit it.

Content of this work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. Code snippets in examples are published under the CC0 1.0 Universal (CC0 1.0). Thanks to all contributors.