SyntaxFix
Write A Post
Hire A Developer
Questions
We got this error because we forgot to multiply by sizeof(int). Note the argument to malloc(..) is a number of bytes, not number of machine words or whatever.