What is wrong with the following declaration? Explain. float *number = 2.30;
The following declaration float *number = 2.30; is not valid because it tries to assign a float value to a pointer to float. The correct way to assign a value to a pointer to float is by providing the address of a float variable or an array of float variables.
Here's an example of how to declare and assign a value to a pointer to float:
float value = 2.30;
________ _______ ____ ______ _____.
________ __________ ____ ______ __________ _____ ______ _____ _____ _________ ________ ________.
____ __________ _______ _______ ____ __________ ______.
_______ ________ _________ _________ _______ ______.
___ ________ _________ ________ _________ ___ __________ ________ ______ ________.
_______ _____ __________ ____ ________ ________.
________ ____ _________ ___ ______ _______ ______ ____ _____.
______ ________ ________ ___ ______ ________.
___ ____ ___ _____ ______ _____ _________ ________ __________.
___ ____ _________ ______ __________.
_____ _______ ___ __________ ________ ________ __________ _________ ____ _______ ___.
___ __________ _____ ______ ________ __________ ________ _________.
__________ _____ _______ ____ _____ _____ _______ __________ ______ _____ ____.
_____ ___ ________ __________ _____ _____ ___ __________ __________ ______ ___.
_______ ________ ______ _________ __________ _____ ______ _______ _____ ________ __________.
_________ __________ __________ __________ __________.
__________ ______ _____ ___ ________ _______ ________ __________ ______ ______.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
✓ Unlock up to 60% of the answer
✓ No payment required