In general they occupy the same amount of space, i.e. sizeof(int)
. However, one could argue that when building an object file with additional symbols for debugging the ratio is different. The amount of data which the variable stores does not change but the debugging symbols occupy more space in case of the longer variable name. Consider a following example.
$ cat short.c && gcc -c short.c && wc -c short.o
int x = 0;
927 short.o
$ cat long.c && gcc -c long.c && wc -c long.o
int this_is_really_really_long_name_for_an_integer_variable = 0;
981 long.o
The difference in size is exactly the difference of lengths of variables' names.
From a run-time efficiency and memory usage point of view it does not matter, though.