coding180 icon

write a grammar in C language to create a node in a singly linked list.

Home > Interviews > PHP

robort - 2022-10-03 02:36:02

In C, the following syntax is used to create a node in a singly linked list: 

struct node   
    int data;   
    struct node *next;  
struct node *head, *ptr;   
ptr = (struct node *)malloc(sizeof(struct node));



Robort Gabriel

Lagos, Nigeria

Freelance Web Developer, Native Android Developer, and Coding Tutor.

  • UI / UX
  • JavaScript
  • Python
  • PHP
  • Kotlin
  • Java
  • Bootrap
  • Android
  • Laravel