but when i store address of any integer in ted say
int i;
ted=&i;
that works fine!
i have doubt in that part that work of ted to store address of any value that address is definitely integer
then why it is giving error when i am storing address of char?
The address of something is not guaranteed to fit inside an integer. It just happened to work for you because on your compiler that's how it works. It is not standard though so you can't do it.
L B has told you everything there is to; you got lucky that your computer is behaving this way. Moreover, recall that integers are usually stored in four bytes of memory whereas a character is stored in one.
if what you are saying is right than i have stored address in integer pointer that's size is greater than char
than it should be able to store the address of char as size of int is greater than size of char ?"