this will give error.
Reason: X is an auto variable.. So it will get memory in run time.
where as Y is a static variable hence it will get memory in compile time. but in compile time value of X is not known. Hence we can not initialize Y with such a value that is unknown at the time of Y's initialization.. So it will generate compile error.