I'm reading post about pointers in C here>>>, and there is one example:
main() {
...
char name[] = "Bill";
int *q;
...
q = name;
printf("%d\n", *q);
...
Which gives me next result:
$ ./pointers_explained
1819044162
So question is about next explanation from author:
(to see how, line up the binary representation of the ascii values for those 4 characters, and then run the 32 bits together, and convert that resultant binary number as an integer.)
Binary for the "Bill" will be:
- B: 01000010
- i: 01101001
- l: 01101100
- l: 01101100
(from an ASCII binary table here>>>)
What I can't get is:
and then run the 32 bits together, and convert that resultant binary number as an integer
So - how can I convert this "Bill"'s binary into the decimal (or any other ) integer "1819044162"?