What is segmentation fault in c++?
Please explain why do we get this error?
@sukhmander A segmentation fault in C++ or C occurs when any program tries to access a part of memory that it is not allowed to access. In simple words, when any program tries to access memory that is beyond the allowed limits that the operating system has allocated for the program.
A segmentation fault in C++ occurs when a program tries to access a memory location that it is not allowed to access, typically due to a programming error such as accessing an array out of bounds or dereferencing a null pointer. The operating system terminates the program and generates an error message.
A segmentation fault in C++ or C occurs when any program tries to access memory that is beyond the allowed limits that the operating system has allocated for the program.
Segmentation fault means your program accessed or executed invalid memory. You’ve got a bug. Seeing some code might help people analyze it but first you should run a debugger on it to see if you can figure it out for yourself. set the limits with bash ulimit to get some core dump.
-
What does List.map function do in dart?
2 years ago
-
What is functional programming?
2 years ago
-
what is dynamic programming?
2 years ago
-
Explain testing and Debugging.
2 years ago
-
Is python easier than other programming languages?
2 years ago
- 14 Forums
- 1,835 Topics
- 5,051 Posts
- 0 Online
- 1,078 Members