Error in sizeof() function

I’m declaring and assigning an integer variable to get the array size but its showing error

My statement-:
int n=sizeof(arr[]);

Error-:
source.cpp: In function ‘int Solve(int*)’:
source.cpp:7:23: error: expected primary-expression before ‘]’ token
7 | int n=sizeof(arr[]);int c=0;int max=0;int j;
|

@aazz share your code using cb ide so that i can look

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.