Nothing more to add to the first question, I think.
AM I allowed to treat float* which i malloc - ed like an array? arr1[0] sets the value of the first block to 5 right, or am I pointing the block of memory to memory address "5" ?
Yes, you are doing this right.
arr1 alone (without any index) just points to the base address of the array or rather the allocated memory block.
However, if you use the indirection operator on the base address, you will get the first value: *arr1. *arr1 is equal to arr1[0]. Consequently arr[i] is the same as *(arr + i), so its nothing more than the indirected base address shifted by the index i.
With this said, your second question can be answered as well: if 'float* varA' is an array, you don't have to use the indirection operator in the function, as varA is a pointer to the base address and varA[i] is equal to *(varA + i), thus it's already indirected.
So in regard to your function:
- 'printf("%i",(int)varA)' would print the base address,
- 'if (varB>*varA[0])' is an illegal indirection and
- 'varA[1] = varC' is all right. : )
This does not apply if 'float *arrA' is NOT a pointer to an array but a single float, though. Then indirection is needed.
Hope this helps (even though my post seems to be pretty messy).
BTW: Pointers in lite-C should behave like in C as long as PRAGMA_POINTER is defined.