QP School

Full Version: Constants and Literals in C
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Constants are fixed values that cannot be modified during the program's execution. In C, you can use literals to represent constants.
#define PI 3.14159  // Declaring a symbolic constant using a #define directive
const int MAX_SIZE = 100;  // Declaring a constant variable using the const keyword