evildictaitor wrote:


Should have checks in it:


int main(){
  int len;
  string b;

  b = (string)malloc(sizeof(char) * 3);
  assert(b != NULL);
  strcpy(b, "Bob\0", 3);
  len = strlen(b);
}



assert really doesn't count as a check, since it is only functional during debugging sessions. For runtime checks you really should use a proper if else construct.