Define a constant using Macro to use in Array declarations in C
As we know that, while declaring an array we need to pass maximum number of elements, for example, if you want to declare an array for 10 elements. You need to pass 10 while declaring. Example: int arr[10];
But, there is a good way, to define a constant by using Macro for it, so that we can easily edit, when required.
Macro definition:
#define MAX 10
Example:
Output
need an explanation for this answer? contact us directly to get an explanation for this answer