Is this small code UB?
TL:DR No, your code does not invoke UB by using anything unini tialized, as you might have thought.
The address of a(ny) variable (automatic, in this case) has a defined value, so irrespective of whether the variable itself is initialized or not, the address of the variable is a defined value. You can make use of that value. ( if you're not dealing with pointers and doing double-dereference. :) )
That said, strictly speaking, you should write
printf("%p", (void *)&bar);
%p expects an argument of type pointer to
printf() being a variadic function, no promotion (conversion) is performed. Otherwise, this is a well-defined behavior.
C11, chapter §22.214.171.124
pThe argument shall be a pointer to