Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

why this comes segment fault (core dumped???????

0 votes
asked Nov 29, 2020 by Rudra Kulkarni (130 points)

1 Answer

0 votes
answered Nov 30, 2020 by Peter Minarik (86,200 points)
Segmentation fault typically occurs on memory violation. This can be dereferencing invalid pointers (e.g. null or pointing to memory address that does not belong to you) or trying to write memory that does not belong to your running program (e.g. uninitialized variables). Another reason could be accessing pointes that had been freed or double freeing them.

So there could be a few reasons. :)

If you need specifics, please, share your code.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...