a variable/function can be declared any number of times but it can be defined only once. What does that actually mean??
I tried to understand that statement on online compilers and I was expecting to show error but it didnt.
#include <stdio.h>
int x=10;
int main() {
x=20;
x=30;
printf("%d",x);
}
expected output: i expected to show error because i have defined variable x and assigned three different values 10,20,30. the concept says you can declare variable any number of times but can define only once since two different locations cant be given to the same variable actual output: 30