123music
Junior Member level 1
I have a long *temp and int *temp1(assuming long is 4 bytes and int is 2 bytes and initialized with some memory address)
if i want to write 2 bytes into temp1 from temp, i will write as
*temp1 = *(int*)temp;
what if i want to write 2 bytes into temp from temp1??can i write as
*(int*)temp = temp1??
Is it allowed in embedded C?
But i think the second case we cannot call it as type casting..What do we call it then?
if i want to write 2 bytes into temp1 from temp, i will write as
*temp1 = *(int*)temp;
what if i want to write 2 bytes into temp from temp1??can i write as
*(int*)temp = temp1??
Is it allowed in embedded C?
But i think the second case we cannot call it as type casting..What do we call it then?