Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Constants and Literals in C
#1
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
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)