久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 3844|回復: 23
打印 上一主題 下一主題
收起左側

有大佬讓我重新把整個C語言學一遍

  [復制鏈接]
跳轉到指定樓層
樓主
ID:886945 發表于 2021-5-31 03:04 來自手機 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
         當初在學校的時候,開的C語言的課,基本也就只是學一學if else for這些加上一些思維邏輯方面的基礎的東西,現在自學單片機,一套32的入門視頻下來,跟著單片機學的C,整套視頻里邊關于C的知識也都能看懂.指針結構體什么的還是能看簡單用一用.
         結果這兩天去面試,大佬給我一份基本純C的筆試題,結果好像只能做出不到一半的題目...
         他讓我回去重新把整套C學一遍直到自己能夠調試到單鏈表的增、刪、改、寫 為止,有大佬有推薦哪個視頻嘛!
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復

使用道具 舉報

沙發
ID:155507 發表于 2021-5-31 08:22 | 只看該作者
可供參考

C語言學習資料推薦
http://www.zg4o1577.cn/bbs/dpj-198731-1.html
回復

使用道具 舉報

板凳
ID:844772 發表于 2021-5-31 08:24 | 只看該作者
會結構和指針,就應該會操作單鏈表,不用老是浪費時間看視頻,太慢了,頂多看看例程,關鍵是自己在腦子里多想,自己給自己出題。鏈表操作,無論單雙還是樹都是基本操作,沒有技術含量。
回復

使用道具 舉報

地板
ID:414556 發表于 2021-5-31 23:08 | 只看該作者
買本C語言的書。結合視頻鞏固知識。
回復

使用道具 舉報

5#
ID:930497 發表于 2021-6-1 10:01 | 只看該作者
直接去b站找吧,c語言教程多的是,建議直接看書,邊學邊做,兩三周就差不多
回復

使用道具 舉報

6#
ID:930641 發表于 2021-6-1 14:17 | 只看該作者
可以去mooc上看看浙江大學的c語言基礎課程,單鏈表的增刪查改涉及到一些數據結構的知識,可以去看一下王道考研數據結構
回復

使用道具 舉報

7#
ID:155507 發表于 2021-6-2 08:28 | 只看該作者
我給你來個程序試試
單鏈表的增、刪

  1. /*
  2. 單鏈表的增、刪
  3. */
  4. #include<stdlib.h>
  5. #include <stdio.h>

  6. void create();
  7. void display();
  8. void insert_begin();
  9. void insert_end();
  10. void insert_pos();
  11. void delete_begin();
  12. void delete_end();
  13. void delete_pos();


  14. struct node
  15. {
  16.         int info;
  17.         struct node *next;
  18. };
  19. struct node *start=NULL;
  20. int main()     
  21. {
  22.         int choice;
  23.         while(1){
  24.                
  25.                 printf("n                MENU                             n");
  26.                 printf("n 1.Create     n");
  27.                 printf("n 2.Display    n");
  28.                 printf("n 3.Insert at the beginning    n");
  29.                 printf("n 4.Insert at the end  n");
  30.                 printf("n 5.Insert at specified position       n");
  31.                 printf("n 6.Delete from beginning      n");
  32.                 printf("n 7.Delete from the end        n");
  33.                 printf("n 8.Delete from specified position     n");
  34.                 printf("n 9.Exit       n");
  35.                 printf("n--------------------------------------n");
  36.                 printf("Enter your choice:t");
  37.                 scanf("%d",&choice);
  38.                 switch(choice)
  39.                 {
  40.                 case 1:
  41.                         create();
  42.                         break;
  43.                 case 2:
  44.                         display();
  45.                         break;
  46.                 case 3:
  47.                         insert_begin();
  48.                         break;
  49.                 case 4:
  50.                         insert_end();
  51.                         break;
  52.                 case 5:
  53.                         insert_pos();
  54.                         break;
  55.                 case 6:
  56.                         delete_begin();
  57.                         break;
  58.                 case 7:
  59.                         delete_end();
  60.                         break;
  61.                 case 8:
  62.                         delete_pos();
  63.                         break;
  64.                        
  65.                 case 9:
  66.                         exit(0);
  67.                         break;
  68.                        
  69.                 default:
  70.                         printf("n Wrong Choice:n");
  71.                         break;
  72.                 }
  73.         }
  74.         return 0;
  75. }
  76. void create()
  77. {
  78.         struct node *temp,*ptr;
  79.         temp=(struct node *)malloc(sizeof(struct node));
  80.         if(temp==NULL)
  81.         {
  82.                 printf("nOut of Memory Space:n");
  83.                 exit(0);
  84.         }
  85.         printf("nEnter the data value for the node:t");
  86.         scanf("%d",&temp->info);
  87.         temp->next=NULL;
  88.         if(start==NULL)
  89.         {
  90.                 start=temp;
  91.         }
  92.         else
  93.         {
  94.                 ptr=start;
  95.                 while(ptr->next!=NULL)
  96.                 {
  97.                         ptr=ptr->next;
  98.                 }
  99.                 ptr->next=temp;
  100.         }
  101. }
  102. void display()
  103. {
  104.         struct node *ptr;
  105.         if(start==NULL)
  106.         {
  107.                 printf("nList is empty:n");
  108.                 return;
  109.         }
  110.         else
  111.         {
  112.                 ptr=start;
  113.                 printf("nThe List elements are:n");
  114.                 while(ptr!=NULL)
  115.                 {
  116.                         printf("%dt",ptr->info );
  117.                         ptr=ptr->next ;
  118.                 }
  119.         }
  120. }
  121. void insert_begin()
  122. {
  123.         struct node *temp;
  124.         temp=(struct node *)malloc(sizeof(struct node));
  125.         if(temp==NULL)
  126.         {
  127.                 printf("nOut of Memory Space:n");
  128.                 return;
  129.         }
  130.         printf("nEnter the data value for the node:t" );
  131.         scanf("%d",&temp->info);
  132.         temp->next =NULL;
  133.         if(start==NULL)
  134.         {
  135.                 start=temp;
  136.         }
  137.         else
  138.         {
  139.                 temp->next=start;
  140.                 start=temp;
  141.         }
  142. }
  143. void insert_end()
  144. {
  145.         struct node *temp,*ptr;
  146.         temp=(struct node *)malloc(sizeof(struct node));
  147.         if(temp==NULL)
  148.         {
  149.                 printf("nOut of Memory Space:n");
  150.                 return;
  151.         }
  152.         printf("nEnter the data value for the node:t" );
  153.         scanf("%d",&temp->info );
  154.         temp->next =NULL;
  155.         if(start==NULL)
  156.         {
  157.                 start=temp;
  158.         }
  159.         else
  160.         {
  161.                 ptr=start;
  162.                 while(ptr->next !=NULL)
  163.                 {
  164.                         ptr=ptr->next ;
  165.                 }
  166.                 ptr->next =temp;
  167.         }
  168. }
  169. void insert_pos()
  170. {
  171.         struct node *ptr,*temp;
  172.         int i,pos;
  173.         temp=(struct node *)malloc(sizeof(struct node));
  174.         if(temp==NULL)
  175.         {
  176.                 printf("nOut of Memory Space:n");
  177.                 return;
  178.         }
  179.         printf("nEnter the position for the new node to be inserted:t");
  180.         scanf("%d",&pos);
  181.         printf("nEnter the data value of the node:t");
  182.         scanf("%d",&temp->info) ;

  183.         temp->next=NULL;
  184.         if(pos==0)
  185.         {
  186.                 temp->next=start;
  187.                 start=temp;
  188.         }
  189.         else
  190.         {
  191.                 for(i=0,ptr=start;i<pos-1;i++) { ptr=ptr->next;
  192.                         if(ptr==NULL)
  193.                         {
  194.                                 printf("nPosition not found:[Handle with care]n");
  195.                                 return;
  196.                         }
  197.                 }
  198.                 temp->next =ptr->next ;
  199.                 ptr->next=temp;
  200.         }
  201. }
  202. void delete_begin()
  203. {
  204.         struct node *ptr;
  205.         if(ptr==NULL)
  206.         {
  207.                 printf("nList is Empty:n");
  208.                 return;
  209.         }
  210.         else
  211.         {
  212.                 ptr=start;
  213.                 start=start->next ;
  214.                 printf("nThe deleted element is :%dt",ptr->info);
  215.                 free(ptr);
  216.         }
  217. }
  218. void delete_end()
  219. {
  220.         struct node *temp,*ptr;
  221.         if(start==NULL)
  222.         {
  223.                 printf("nList is Empty:");
  224.                 exit(0);
  225.         }
  226.         else if(start->next ==NULL)
  227.         {
  228.                 ptr=start;
  229.                 start=NULL;
  230.                 printf("nThe deleted element is:%dt",ptr->info);
  231.                 free(ptr);
  232.         }
  233.         else
  234.         {
  235.                 ptr=start;
  236.                 while(ptr->next!=NULL)
  237.                 {
  238.                         temp=ptr;
  239.                         ptr=ptr->next;
  240.                 }
  241.                 temp->next=NULL;
  242.                 printf("nThe deleted element is:%dt",ptr->info);
  243.                 free(ptr);
  244.         }
  245. }
  246. void delete_pos()
  247. {
  248.         int i,pos;
  249.         struct node *temp,*ptr;
  250.         if(start==NULL)
  251.         {
  252.                 printf("nThe List is Empty:n");
  253.                 exit(0);
  254.         }
  255.         else
  256.         {
  257.                 printf("nEnter the position of the node to be deleted:t");
  258.                 scanf("%d",&pos);
  259.                 if(pos==0)
  260.                 {
  261.                         ptr=start;
  262.                         start=start->next ;
  263.                         printf("nThe deleted element is:%dt",ptr->info  );
  264.                         free(ptr);
  265.                 }
  266.                 else
  267.                 {
  268.                         ptr=start;
  269.                         for(i=0;i<pos;i++) { temp=ptr; ptr=ptr->next ;
  270.                                 if(ptr==NULL)
  271.                                 {
  272.                                         printf("nPosition not Found:n");
  273.                                         return;
  274.                                 }
  275.                         }
  276.                         temp->next =ptr->next ;
  277.                         printf("nThe deleted element is:%dt",ptr->info );
  278.                         free(ptr);
  279.                 }
  280.         }
  281. }
復制代碼
回復

使用道具 舉報

8#
ID:932858 發表于 2021-6-4 14:12 | 只看該作者
我覺得學C看書蠻快的,我覺得視頻比較拖,耽誤時間,樓主已經有基礎來了?磿耆梢詣偃
回復

使用道具 舉報

9#
ID:883242 發表于 2021-6-4 15:37 | 只看該作者
看大佬的意思不是說你c語言不行,而是沒看過《數據結構》這種編程基礎知識。
回復

使用道具 舉報

10#
ID:933203 發表于 2021-6-5 09:23 | 只看該作者
推薦The_C_Programming_Language這本書,有電子中文版的
回復

使用道具 舉報

11#
ID:933229 發表于 2021-6-5 14:55 來自手機 | 只看該作者
慕課里就有
回復

使用道具 舉報

12#
ID:934580 發表于 2021-6-8 08:32 | 只看該作者
要快。我覺得邊做題邊學更好。去樂扣刷題。不會的就研究。有點基礎的話不怕
回復

使用道具 舉報

13#
ID:940357 發表于 2021-6-19 12:30 | 只看該作者
看書加看視頻 效果更好
回復

使用道具 舉報

14#
ID:937320 發表于 2021-6-20 07:28 | 只看該作者
c的primer 書就可以了。C語言有技術,再重新學一下也很快 。但不重學的話,知識不全。其實有針對性的,學不會的就好
回復

使用道具 舉報

15#
ID:886945 發表于 2021-12-23 04:09 | 只看該作者
angmall 發表于 2021-6-2 08:28
我給你來個程序試試
單鏈表的增、刪

哈哈,半年后才重新回來看帖子...粗略的看了一下,雖然這半年也沒怎么寫程序,但是結構體指針這些都還算能接受了...主要還是需要多看看別人代碼...
回復

使用道具 舉報

16#
ID:139866 發表于 2021-12-23 09:44 | 只看該作者
sdarling 發表于 2021-12-23 04:09
哈哈,半年后才重新回來看帖子...粗略的看了一下,雖然這半年也沒怎么寫程序,但是結構體指針這些都還算 ...

你以為你懂了,其實沒有,程序是寫出來的不是看出來的
回復

使用道具 舉報

17#
ID:748788 發表于 2021-12-23 14:13 | 只看該作者
對源程序做一些修改,看自己能否再獨立寫出完整的程序
回復

使用道具 舉報

18#
ID:996200 發表于 2021-12-23 19:42 | 只看該作者
你去慕課上看各大高校的課
回復

使用道具 舉報

19#
ID:996353 發表于 2021-12-23 23:29 | 只看該作者
會結構和指針,就應該會操作單鏈表,基本上嗶哩嗶哩可以自學
回復

使用道具 舉報

20#
ID:86450 發表于 2021-12-24 08:11 | 只看該作者
都會指針了,好強。  我寫單片機邏輯業務簡單的 ,從來不用指針。  看多一個多級菜單程序用過指針。看了好久才明白怎么回事。
回復

使用道具 舉報

21#
ID:514901 發表于 2021-12-24 17:56 | 只看該作者
數據結構而已,本質還是結構體與指針
回復

使用道具 舉報

22#
ID:415064 發表于 2021-12-24 19:47 | 只看該作者
直接去B站找郝斌C語言和數據結構,你現在是ifelseswitch, 那么你缺的是精華部分->指針,內存,數據結構的鏈表隊列,算法里面的排序、濾波,代碼規范、再來點實際應用的PID,wifi這些就基本就差不多
回復

使用道具 舉報

23#
ID:816989 發表于 2021-12-24 20:57 | 只看該作者
建議看C Primer,這本書對學習C語言新手有幫助的。而且,常用的代碼函數會在這本書上找,還可以當作查字典。
回復

使用道具 舉報

24#
ID:382454 發表于 2021-12-24 21:13 來自手機 | 只看該作者
買書,買學習版,看例程,自己開發多實操練練就上手快。
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 精品国产一区二区三区免费 | 精品国产乱码久久久久久丨区2区 | 国产精品国产三级国产aⅴ浪潮 | 天天天操操操 | 国产精品中文字幕在线 | 91精品国产色综合久久不卡蜜臀 | 日批av| 日日躁狠狠躁aaaaxxxx | 欧美日韩精品影院 | 在线免费观看成年人视频 | 色婷婷精品国产一区二区三区 | 国产午夜影院 | 一区二区久久 | 欧美日韩在线一区二区三区 | 久在线 | 中文字幕精品一区二区三区精品 | 做a视频 | 99热国产精品 | 欧洲性生活视频 | 欧美另类日韩 | 日韩天堂av| 久久精品亚洲欧美日韩精品中文字幕 | 国产成人高清在线观看 | 亚洲人的av| 一级在线视频 | av中文字幕在线 | 国产在线1 | 婷婷国产一区二区三区 | 青青草一区二区三区 | 欧美日韩综合视频 | av片毛片 | 日韩高清国产一区在线 | 亚洲伊人a | pacopacomama在线 | 成人综合视频在线观看 | 精品国产一区二区三区性色 | 精品国产一区一区二区三亚瑟 | 久久精品日产第一区二区三区 | 精品成人免费视频 | 久久69精品久久久久久久电影好 | 狠狠久久|