Hi guys, why can't I write in c like this int arr[4.5] ?
Hi guys, why can't I write in c like this int arr[4.5] ?
Is this a serious question?
What does your compiler tell you?
The compiler tells: Take still a joint!
Joint music:
YouTube
Does it make sense to have half of an element? What would that even mean?
Assuming int is 32 bits wide, do you expect the compiler to make the last element 16 bits wide? What if you try "int arr[4.3]"? Would you expect the compiler to give you a last element that's 9.6 bits wide??
Try to think these things through before asking questions that should be pretty obviously silly.
thanks ! convinced me