Debug segmentation faults and memory access violations
Help me debug a segmentation fault in my {{LANGUAGE}} program.
**Error output:**
```
{{ERROR_OUTPUT}}
```
**Code section:**
```{{LANGUAGE}}
{{CODE}}
```
**GDB/debugger output (if available):**
```
{{DEBUGGER_OUTPUT}}
```
**What the code should do:** {{EXPECTED_BEHAVIOR}}
**When does it crash:**…Premium Prompt
Unlock this prompt — and all 30,000+ expert-crafted prompts — with Pro.
Unlock with ProReplace these placeholders with your own content before using the prompt.
[{LANGUAGE][{ERROR_OUTPUT][{CODE][{DEBUGGER_OUTPUT][{EXPECTED_BEHAVIOR]