The editor is awful .
I write a code a compile here . It along with IDE show Run Error while other compilers are giving me the desired output.
What should I do?
Run Error( Not in all Problems)
Hello @karanagg1001_ada553cce04a2f43,
You are declaring like this:
int n,arr[n];
cin>>n;
This is totally wrong, when you are creating an array of size n compiler doesn’t know the value of n. So, it automatically assigns a random number to n and creates an array of random size.
Correct way is:
int n;
cin>>n;
int arr[n];
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.
you have reopen this doubt
any futher doubt in this??
The editor is awful . I write a code a compile here . It along with IDE show Run Error while other compilers are giving me the desired output. What should I do?
Editor has no bugs, every editor uses c++ compiler.
I am using it since last 2 years
If you write wrong code and it shows error then that doesn’t means complier is aweful
Sometime different compilers may show different results if you write some ambiguous statement.
Use doubt portal and Share your code with us if you have some problem we will resolve it
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.