If we try to convert string into integer explicitly then string’s address will get stored in integer.
int main()
{
char *a="abhas";
int b=(int)a;
// now b will hold address of a
}
int main()
{
char *a="abhas";
int b=(int)a;
// now b will hold address of a
}
No comments:
Post a Comment