79251164

Date: 2024-12-04 12:34:14
Score: 2
Natty:
Report link

If I allocate memory for this struct using malloc, will the pointer variables be NULL?

No this is not true, you have to assign the variables yourself. I would point to newly allocated memory (generally there is some garbage value in there).

P.S. malloc gives you an un-initialized buffer however calloc provides you 0ed memory.

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Umer Arshad