Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8409201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:50:26+00:00 2026-06-09T23:50:26+00:00

#include<stdio.h> #include<stdlib.h> /* Link list node */ struct node { int data; struct node

  • 0
#include<stdio.h>
#include<stdlib.h>

/* Link list node */
struct node
{
    int data;
    struct node *next;
};

/* Function to reverse the linked list */
static void reverse(struct node** head_ref)
{
    struct node *prev   = NULL;
    struct node *current = *head_ref;
    struct node *next;
    while (current != NULL)
    {
        next  = current->next; 
        current->next = prev;  
        prev = current;
        current = next;
    }
    *head_ref = prev;
}
  1. What are the lines that start with struct in the reverse function responsible of?
    do they extend the original struct or creating new structs that the original struct pointing to? I don’t really understand why there is no name to the original struct
  2. Is there a diffrence between struct node *next; and struct node* next; ?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:50:27+00:00Added an answer on June 9, 2026 at 11:50 pm
    1. Line struct node *prev is declaration of variable prev of type “pointer to struct node”. These lines just declare some local variables. prev contains a pointer to the last processed node, current contains a pointer to the currently processing node and next is used to save a pointer to the next node of original list.

    2. There’s no difference between struct node *next and struct node* next.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

#include<stdio.h> #include<stdlib.h> struct node { int data; struct node *next; }; void insert( struct
struct node { int data; struct node *next; }; struct node * list,root; list=NULL;
#include <stdio.h> #include <stdlib.h> int main(void) { int x; int *in, *begin; in =
#include <stdio.h> #include <stdlib.h> #include <time.h> void initDeck (int deck[]); void showDeck (int deck[]);
#include<stdio.h> #include<signal.h> #include<stdlib.h> void handler(int signo) { printf(First statement); system(date); exit(EXIT_SUCCESS); } int main()
Here is a program it is working #include <stdio.h> #include <stdlib.h> struct node {
#include <stdio.h> #include <stdlib.h> #include <time.h> #define length 100 void print_array(); int main() {
#include <stdio.h> #include <stdlib.h> #include <string.h> void main() { typedef int (FuncPtr)(); char asmFunc[]
#include <stdio.h> #include <stdlib.h> void copyint(char *i,char** temp); int main() { char* a=00313; char*
#include stdafx.h #include stdio.h #include math.h #include stdlib.h void test (int a,int *b, int

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.