please see and suggest me why should my code gives error i.e shows segmentation fault
My code gives segmentation fault
hello @rishabhkumargupta97
pls go to this link -> https://ide.codingblocks.com/
paste ur code , press ctrl + s and then save
a url will be generated in ur search bar , share that url with me
please look it once where i am going wrong.
check now->
why my code gives wrong answer?what would be missing.please help me out
ckeck now->
a) use long long to avoid overflow
b) declare maxsofar,current sum inside while loop
c) first update maxsfar and then current sum
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.