Hot Search : Source embeded web remote control p2p game More...
Location : Home Downloads SourceCode Mathimatics-Numerical algorithms Data structs

WinRAR-ZIP

  • Category : Data structs
  • Tags :
  • Update : 2012-11-26
  • Size : 3kb
  • Downloaded :0次
  • Author :ye***
  • About : Nobody
  • PS : If download it fails, try it again. Download again for free!
Download1 Download2
Don't use download software fo downloading.
If download fail,Try it again for free.
Introduction - If you have any usage issues, please Google them yourself
#include <stdio.h> #include <stdlib.h> #include <time.h> const int M=10 typedef int Type typedef struct Node{ Type data struct Node* next }Node void add_elem(Node**head,Type data){ Node* tmp = (Node*)malloc(sizeof(Node)) tmp->data = data tmp->next = (*head) *head = tmp } void print_list(Node*head){ while(head){ printf(“ d “, head->data) head = head->next } printf(“\n”) } void reverse_list(Node**head){ if(!*head)//如果(*head)==NULL return Node*p1,*p2 p1 =*head p2 = (*head)->next if(!p2)//如果没有下一个节点 return reverse_list(&p2) //同时存在两个节点就要进行翻转 p1->next->next = p1 p1->next = NULL //主要是保证,第一个节点指向NULL (*head) = p2 } int main(){ Node*head = NULL for(int i=0 i<M i++) add_elem(&head, rand() 100) print_list(head) reverse_list(&head) print_list(head) }
Packet file list
(Preview for download)
record.doc
Related instructions
  • We are an exchange download platform that only provides communication channels. The downloaded content comes from the internet. Except for download issues, please Google on your own.
  • The downloaded content is provided for members to upload. If it unintentionally infringes on your copyright, please contact us.
  • Please use Winrar for decompression tools
  • If download fail, Try it againg or Feedback to us.
  • If downloaded content did not match the introduction, Feedback to us,Confirm and will be refund.
  • Before downloading, you can inquire through the uploaded person information

Nothing.

Post Comment
*Quick comment Recommend Not bad Password Unclear description Not source
Lost files Unable to decompress Bad
*Content :
*Captcha :
CodeBus is the largest source code store in internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.