fork download
  1. 課題7-4で作成したリストで表現されたキューに対してdequeueを行う関数を作成せよ。
  2. dequeue関数を呼び出す前後でprint_queue_listを呼びだしdequeue関数が正常にはたら家いいることを
  3. 確認せよ。
  4.  
  5. (ヒント)
  6. dequeue関数のプロトタイプ宣言は char dequeue(struct queue *q);とする。
  7.  
  8. 課題7ー4
  9. #include<stdio.h>
  10. #include<stdlib.h>
  11. #include<string.h>
  12.  
  13. typedef struct data{
  14. struct data *next;
  15. char key;
  16. }data;
  17.  
  18. typedef struct queue{
  19. data *top,*rear;
  20. }queue;
  21.  
  22.  
  23. void print_queue_list(struct queue q);
  24.  
  25.  
  26. int main(){
  27. data d1;
  28. data d2;
  29. data d3;
  30. data d4;
  31. queue q;
  32.  
  33.  
  34. d1.next = &d2;
  35. d1.key = 'a';
  36. d2.next = &d3;
  37. d2.key = 'b';
  38. d3.next = &d4;
  39. d3.key = 'c';
  40. d4.next = NULL;
  41. d4.key = 'd';
  42.  
  43. q.top = &d1;
  44. q.rear = &d4;
  45.  
  46.  
  47.  
  48. print_queue_list(q);
  49.  
  50.  
  51. return 0;
  52. }
  53.  
  54. void print_queue_list(struct queue q)
  55. {
  56.  
  57. while(q.top != NULL){
  58.  
  59.  
  60. printf("%c\n",q.top->key);
  61.  
  62.  
  63. q.top = q.top->next;
  64.  
  65.  
  66. }
  67.  
  68.  
  69.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1: error: stray ‘\350’ in program
prog.c:1: error: stray ‘\252’ in program
prog.c:1: error: stray ‘\262’ in program
prog.c:1: error: stray ‘\351’ in program
prog.c:1: error: stray ‘\241’ in program
prog.c:1: error: stray ‘\214’ in program
prog.c:1: error: expected identifier or ‘(’ before numeric constant
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\201’ in program
prog.c:1: error: stray ‘\247’ in program
prog.c:1: error: stray ‘\344’ in program
prog.c:1: error: stray ‘\275’ in program
prog.c:1: error: stray ‘\234’ in program
prog.c:1: error: stray ‘\346’ in program
prog.c:1: error: stray ‘\210’ in program
prog.c:1: error: stray ‘\220’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\201’ in program
prog.c:1: error: stray ‘\227’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\201’ in program
prog.c:1: error: stray ‘\237’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\203’ in program
prog.c:1: error: stray ‘\252’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\202’ in program
prog.c:1: error: stray ‘\271’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\203’ in program
prog.c:1: error: stray ‘\210’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\201’ in program
prog.c:1: error: stray ‘\247’ in program
prog.c:1: error: stray ‘\350’ in program
prog.c:1: error: stray ‘\241’ in program
prog.c:1: error: stray ‘\250’ in program
prog.c:1: error: stray ‘\347’ in program
prog.c:1: error: stray ‘\217’ in program
prog.c:1: error: stray ‘\276’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\201’ in program
prog.c:1: error: stray ‘\225’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\202’ in program
prog.c:1: error: stray ‘\214’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\201’ in program
prog.c:1: error: stray ‘\237’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\202’ in program
prog.c:1: error: stray ‘\255’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\203’ in program
prog.c:1: error: stray ‘\245’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\203’ in program
prog.c:1: error: stray ‘\274’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\201’ in program
prog.c:1: error: stray ‘\253’ in program
prog.c:1: error: stray ‘\345’ in program
prog.c:1: error: stray ‘\257’ in program
prog.c:1: error: stray ‘\276’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\201’ in program
prog.c:1: error: stray ‘\227’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\201’ in program
prog.c:1: error: stray ‘\246’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\202’ in program
prog.c:1: error: stray ‘\222’ in program
prog.c:1: error: stray ‘\350’ in program
prog.c:1: error: stray ‘\241’ in program
prog.c:1: error: stray ‘\214’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\201’ in program
prog.c:1: error: stray ‘\206’ in program
prog.c:1: error: stray ‘\351’ in program
prog.c:1: error: stray ‘\226’ in program
prog.c:1: error: stray ‘\242’ in program
prog.c:1: error: stray ‘\346’ in program
prog.c:1: error: stray ‘\225’ in program
prog.c:1: error: stray ‘\260’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\202’ in program
prog.c:1: error: stray ‘\222’ in program
prog.c:1: error: stray ‘\344’ in program
prog.c:1: error: stray ‘\275’ in program
prog.c:1: error: stray ‘\234’ in program
prog.c:1: error: stray ‘\346’ in program
prog.c:1: error: stray ‘\210’ in program
prog.c:1: error: stray ‘\220’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\201’ in program
prog.c:1: error: stray ‘\233’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\202’ in program
prog.c:1: error: stray ‘\210’ in program
prog.c:1: error: stray ‘\343’ in program
prog.c:1: error: stray ‘\200’ in program
prog.c:1: error: stray ‘\202’ in program
prog.c:2: error: stray ‘\351’ in program
prog.c:2: error: stray ‘\226’ in program
prog.c:2: error: stray ‘\242’ in program
prog.c:2: error: stray ‘\346’ in program
prog.c:2: error: stray ‘\225’ in program
prog.c:2: error: stray ‘\260’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\202’ in program
prog.c:2: error: stray ‘\222’ in program
prog.c:2: error: stray ‘\345’ in program
prog.c:2: error: stray ‘\221’ in program
prog.c:2: error: stray ‘\274’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\263’ in program
prog.c:2: error: stray ‘\345’ in program
prog.c:2: error: stray ‘\207’ in program
prog.c:2: error: stray ‘\272’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\231’ in program
prog.c:2: error: stray ‘\345’ in program
prog.c:2: error: stray ‘\211’ in program
prog.c:2: error: stray ‘\215’ in program
prog.c:2: error: stray ‘\345’ in program
prog.c:2: error: stray ‘\276’ in program
prog.c:2: error: stray ‘\214’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\247’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\202’ in program
prog.c:2: error: stray ‘\222’ in program
prog.c:2: error: stray ‘\345’ in program
prog.c:2: error: stray ‘\221’ in program
prog.c:2: error: stray ‘\274’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\263’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\240’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\227’ in program
prog.c:2: error: stray ‘\351’ in program
prog.c:2: error: stray ‘\226’ in program
prog.c:2: error: stray ‘\242’ in program
prog.c:2: error: stray ‘\346’ in program
prog.c:2: error: stray ‘\225’ in program
prog.c:2: error: stray ‘\260’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\214’ in program
prog.c:2: error: stray ‘\346’ in program
prog.c:2: error: stray ‘\255’ in program
prog.c:2: error: stray ‘\243’ in program
prog.c:2: error: stray ‘\345’ in program
prog.c:2: error: stray ‘\270’ in program
prog.c:2: error: stray ‘\270’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\253’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\257’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\237’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\202’ in program
prog.c:2: error: stray ‘\211’ in program
prog.c:2: error: stray ‘\345’ in program
prog.c:2: error: stray ‘\256’ in program
prog.c:2: error: stray ‘\266’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\204’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\204’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\202’ in program
prog.c:2: error: stray ‘\213’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\223’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\250’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\202’ in program
prog.c:2: error: stray ‘\222’ in program
prog.c:3: error: stray ‘\347’ in program
prog.c:3: error: stray ‘\242’ in program
prog.c:3: error: stray ‘\272’ in program
prog.c:3: error: stray ‘\350’ in program
prog.c:3: error: stray ‘\252’ in program
prog.c:3: error: stray ‘\215’ in program
prog.c:3: error: stray ‘\343’ in program
prog.c:3: error: stray ‘\201’ in program
prog.c:3: error: stray ‘\233’ in program
prog.c:3: error: stray ‘\343’ in program
prog.c:3: error: stray ‘\202’ in program
prog.c:3: error: stray ‘\210’ in program
prog.c:3: error: stray ‘\343’ in program
prog.c:3: error: stray ‘\200’ in program
prog.c:3: error: stray ‘\202’ in program
prog.c:5: error: stray ‘\357’ in program
prog.c:5: error: stray ‘\274’ in program
prog.c:5: error: stray ‘\210’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\203’ in program
prog.c:5: error: stray ‘\222’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\203’ in program
prog.c:5: error: stray ‘\263’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\203’ in program
prog.c:5: error: stray ‘\210’ in program
prog.c:5: error: stray ‘\357’ in program
prog.c:5: error: stray ‘\274’ in program
prog.c:5: error: stray ‘\211’ in program
prog.c:6: error: stray ‘\351’ in program
prog.c:6: error: stray ‘\226’ in program
prog.c:6: error: stray ‘\242’ in program
prog.c:6: error: stray ‘\346’ in program
prog.c:6: error: stray ‘\225’ in program
prog.c:6: error: stray ‘\260’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\201’ in program
prog.c:6: error: stray ‘\256’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\203’ in program
prog.c:6: error: stray ‘\227’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\203’ in program
prog.c:6: error: stray ‘\255’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\203’ in program
prog.c:6: error: stray ‘\210’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\202’ in program
prog.c:6: error: stray ‘\277’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\202’ in program
prog.c:6: error: stray ‘\244’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\203’ in program
prog.c:6: error: stray ‘\227’ in program
prog.c:6: error: stray ‘\345’ in program
prog.c:6: error: stray ‘\256’ in program
prog.c:6: error: stray ‘\243’ in program
prog.c:6: error: stray ‘\350’ in program
prog.c:6: error: stray ‘\250’ in program
prog.c:6: error: stray ‘\200’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\201’ in program
prog.c:6: error: stray ‘\257’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\201’ in program
prog.c:6: error: stray ‘\250’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\201’ in program
prog.c:6: error: stray ‘\231’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\202’ in program
prog.c:6: error: stray ‘\213’ in program
prog.c:6: error: stray ‘\343’ in program
prog.c:6: error: stray ‘\200’ in program
prog.c:6: error: stray ‘\202’ in program
prog.c:8: error: stray ‘\350’ in program
prog.c:8: error: stray ‘\252’ in program
prog.c:8: error: stray ‘\262’ in program
prog.c:8: error: stray ‘\351’ in program
prog.c:8: error: stray ‘\241’ in program
prog.c:8: error: stray ‘\214’ in program
prog.c:8: error: stray ‘\357’ in program
prog.c:8: error: stray ‘\274’ in program
prog.c:8: error: stray ‘\227’ in program
prog.c:8: error: stray ‘\343’ in program
prog.c:8: error: stray ‘\203’ in program
prog.c:8: error: stray ‘\274’ in program
prog.c:8: error: stray ‘\357’ in program
prog.c:8: error: stray ‘\274’ in program
prog.c:8: error: stray ‘\224’ in program
prog.c: In function ‘print_queue_list’:
prog.c:66: error: expected declaration or statement at end of input
stdout
Standard output is empty