Search code examples
cpointersmember-access

What is cryptic line of code for this statement?


For example:

  • temp->next = NULL is same as (*temp).next = NULL
  • list->next->next = temp is same as ??

Solution

  • This line

    list->next->next = temp;
    

    can be rewritten in several ways. For example

    ( *list ).next->next = temp;
    

    or

    ( *( *list ).next ).next = temp;
    

    or

    ( *list ->next ).next = temp;