FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 179   



If you declare a variable as constant in C Language, the value of that can't be changed during the execution of the program.
You can use the keyword const to declare variables as constants.
Following is a sample C Program shows how to declare constant variables.

#include <stdio.h>

int main() {

    const int grades = 4;

    printf("total number of grades: %d", grades);
}

If your code tries to modify constant variables, Compiler will give you an error.




On By


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News