Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about heap-corruption

Read more about heap-corruption

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - heap-corruption

Heap error in delete statement when object is destroyed in C++

I created a simple StringBuilder class to practice. A similar class is available in other programming languages. When the destructor of this class is called, I try to delete the memory allocated to th...
test-img

MRJ

c++

dynamic

heap-memory

destructor

heap-corruption

Votes: 0

Answers: 0

Need to return pointer to a string array but can't get it right

This is Leetcode's palindrome problem, which I solved with JavaScript. Then I decided to try it with C and the problem I'm running into is that if I define the array by value, when I would try to retu...
test-img

No-name-yet

c

pointers

c-strings

heap-corruption

Votes: 0

Answers: 1

Latest Answer

You dont want the extra * in char *longestPal = malloc(sizeof(*char) * strLength); . You also should add 1 to include a byte for the null terminator at the end of the string. Change it to char *longe...
test-img

Sam

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved