0 votes 0 votes main() { register int i = 10; int *a= &i; printf("%d",*a); return 0 ; } why writing program like this is no good , i studied that it is compiler dependent it will run or not that depends on compiler ? sumit goyal 1 asked Jan 17, 2018 sumit goyal 1 192 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply MiNiPanda commented Jan 17, 2018 reply Follow Share I read that :- By using "register" keyword, we are requesting to the compiler to get register allocation to store the variable. It is not a command. So the request can be denied if there is no space. But this denial will not be informed. Edit: I missed that line of code..you are trying to access the address of register..it shows error..but why i don't the proper reason... 1 votes 1 votes sumit goyal 1 commented Jan 17, 2018 reply Follow Share @MiNiPanda thanku :P 1 votes 1 votes Shubhanshu commented Jan 17, 2018 reply Follow Share It is compiler dependent, in this compiler may give an error. Because an integer pointer pointing to a register which is not in memory and hence its address is not available. 1 votes 1 votes sumit goyal 1 commented Jan 17, 2018 reply Follow Share thanks bro 0 votes 0 votes Please log in or register to add a comment.