Why is my program causing SIGABRT error?
SIGABRT errors are caused by your program aborting due to a fatal error. In C++, this is normally due to an assert statement in C++ not returning true, but some STL elements can generate this if they try to store too much memory.
1 Like
scanf( ā%dā, &*( hill + i ) );
This line is wrong in your source code. You are deferencing then asking for address, you should write either (hill+i) or &hill[i]. No need for * operator.
https://www.codechef.com/viewsolution/11160529
why do i get SIGABART here ? the code works really fine when executed on other C IDEs.
https://www.codechef.com/viewsolution/12914859 Why SIGABRT error here? It works fine on GeeksforGeeks IDE.
1 Like
int* ans = new int[t]; should be written after cin>>t;
1 Like