From the definition of const qualifier, that the variable value cannot be changed in the current file, but can be changed in another file, I tried to write the program but resulted in segmentation fault.
file1.c
file2.cCode:#include<stdio.h> const int x = 5; void main(){ printf("%d",x); show(); }
Please help me..Code:void show() { extern int x; x++; printf("%d",x); }