C
Chad
And I quote the following URL...
http://qna.indiatimes.com/Programmi...e_pointer_to_unsigned_int_in_C_language?.html
"Why it is not possible to create pointer to unsigned int in C
language?"
"The variable the holds the address (the pointer) is not interested if
the value at the address it stores is signed or unsigned. One thing is
sure: it must store an int, careless if it is signed or unsigned."
Is this wrong? Just curious because I can create a pointer to unsigned
int. Here is what I mean..
[cdalten@localhost oakland]$ more us.c
#include <stdio.h>
int main(void)
{
unsigned int a = 5;
unsigned int *b = &a;
printf("The value of b is: %u\n", *b);
return 0;
}
[cdalten@localhost oakland]$ gcc -Wall us.c -o us
[cdalten@localhost oakland]$ ./us
The value of b is: 5
[cdalten@localhost oakland]$
http://qna.indiatimes.com/Programmi...e_pointer_to_unsigned_int_in_C_language?.html
"Why it is not possible to create pointer to unsigned int in C
language?"
"The variable the holds the address (the pointer) is not interested if
the value at the address it stores is signed or unsigned. One thing is
sure: it must store an int, careless if it is signed or unsigned."
Is this wrong? Just curious because I can create a pointer to unsigned
int. Here is what I mean..
[cdalten@localhost oakland]$ more us.c
#include <stdio.h>
int main(void)
{
unsigned int a = 5;
unsigned int *b = &a;
printf("The value of b is: %u\n", *b);
return 0;
}
[cdalten@localhost oakland]$ gcc -Wall us.c -o us
[cdalten@localhost oakland]$ ./us
The value of b is: 5
[cdalten@localhost oakland]$