How do we write C++ equivalent in C

  • 0

    Hi, I'm a beginner in C. I wanted to know how do we write this statement in C.

    p->next = new ListNode(sum % 10);

    We need to make use of malloc right but I'm not understanding how do I exactly construct it ?

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.