I think C Compiler always assume the type as int. In your programs the 
Address is treated as an integer and is assigned to the variable 
without any error but see the Warning. It clearly points out that there 
is an incorrect conversion taking place like address got converted to 
an Integer or some thing like that.

But then u have char and char* as the return type compiler can easily 
point out that there is a problem.

Apart from that the follwoing things can be noted in your code listing.

1. The main return type should be int. (Here it doesnt make any 
difference, i am just saying the best practices)
2. You are returning the address of local varaible and is not allowed 
and you should stay away from such programming practices even for 
examples. because its suicidal to do.

Thanks and regards
Ganesh

Reply via email to