fork download
  1. 課題7-4(下記に記載)で作成したリストで表現されたキューに対しenqueueを行う関数を
  2. 作成せよ。enqueue関数を呼び出す前と後でprint_queue_listを呼びだし、enqueue関数が
  3. 正常に働いていることを確認せよ。
  4. (ヒント)
  5. enqueue関数のプロトタイプ宣言はvoid enqueue(struct queue *q, char key);とする
  6.  
  7. (課題7ー4)
  8.  
  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 ‘\344’ in program
prog.c:1: error: stray ‘\270’ in program
prog.c:1: error: stray ‘\213’ in program
prog.c:1: error: stray ‘\350’ in program
prog.c:1: error: stray ‘\250’ in program
prog.c:1: error: stray ‘\230’ 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 ‘\350’ in program
prog.c:1: error: stray ‘\250’ in program
prog.c:1: error: stray ‘\230’ in program
prog.c:1: error: stray ‘\350’ in program
prog.c:1: error: stray ‘\274’ in program
prog.c:1: error: stray ‘\211’ 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 ‘\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 ‘\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:2: error: stray ‘\344’ in program
prog.c:2: error: stray ‘\275’ in program
prog.c:2: error: stray ‘\234’ in program
prog.c:2: error: stray ‘\346’ in program
prog.c:2: error: stray ‘\210’ in program
prog.c:2: error: stray ‘\220’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\233’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\202’ in program
prog.c:2: error: stray ‘\210’ in program
prog.c:2: error: stray ‘\343’ in program
prog.c:2: error: stray ‘\200’ in program
prog.c:2: 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 ‘\343’ in program
prog.c:2: error: stray ‘\201’ in program
prog.c:2: error: stray ‘\250’ 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 ‘\343’ in program
prog.c:2: error: stray ‘\200’ in program
prog.c:2: error: stray ‘\201’ 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:3: error: stray ‘\346’ in program
prog.c:3: error: stray ‘\255’ in program
prog.c:3: error: stray ‘\243’ in program
prog.c:3: error: stray ‘\345’ in program
prog.c:3: error: stray ‘\270’ in program
prog.c:3: error: stray ‘\270’ in program
prog.c:3: error: stray ‘\343’ in program
prog.c:3: error: stray ‘\201’ in program
prog.c:3: error: stray ‘\253’ in program
prog.c:3: error: stray ‘\345’ in program
prog.c:3: error: stray ‘\203’ 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 ‘\204’ in program
prog.c:3: error: stray ‘\343’ in program
prog.c:3: error: stray ‘\201’ in program
prog.c:3: error: stray ‘\246’ in program
prog.c:3: error: stray ‘\343’ in program
prog.c:3: error: stray ‘\201’ in program
prog.c:3: error: stray ‘\204’ in program
prog.c:3: error: stray ‘\343’ in program
prog.c:3: error: stray ‘\202’ in program
prog.c:3: error: stray ‘\213’ in program
prog.c:3: error: stray ‘\343’ in program
prog.c:3: error: stray ‘\201’ in program
prog.c:3: error: stray ‘\223’ in program
prog.c:3: error: stray ‘\343’ in program
prog.c:3: error: stray ‘\201’ in program
prog.c:3: error: stray ‘\250’ in program
prog.c:3: error: stray ‘\343’ in program
prog.c:3: error: stray ‘\202’ in program
prog.c:3: 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:4: error: stray ‘\343’ in program
prog.c:4: error: stray ‘\203’ in program
prog.c:4: error: stray ‘\222’ in program
prog.c:4: error: stray ‘\343’ in program
prog.c:4: error: stray ‘\203’ in program
prog.c:4: error: stray ‘\263’ in program
prog.c:4: error: stray ‘\343’ in program
prog.c:4: error: stray ‘\203’ in program
prog.c:4: error: stray ‘\210’ in program
prog.c:5: error: stray ‘\351’ in program
prog.c:5: error: stray ‘\226’ in program
prog.c:5: error: stray ‘\242’ in program
prog.c:5: error: stray ‘\346’ in program
prog.c:5: error: stray ‘\225’ in program
prog.c:5: error: stray ‘\260’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\201’ in program
prog.c:5: error: stray ‘\256’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\203’ in program
prog.c:5: error: stray ‘\227’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\203’ in program
prog.c:5: error: stray ‘\255’ 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 ‘\343’ in program
prog.c:5: error: stray ‘\202’ in program
prog.c:5: error: stray ‘\277’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\202’ in program
prog.c:5: error: stray ‘\244’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\203’ in program
prog.c:5: error: stray ‘\227’ in program
prog.c:5: error: stray ‘\345’ in program
prog.c:5: error: stray ‘\256’ in program
prog.c:5: error: stray ‘\243’ in program
prog.c:5: error: stray ‘\350’ in program
prog.c:5: error: stray ‘\250’ in program
prog.c:5: error: stray ‘\200’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\201’ in program
prog.c:5: error: stray ‘\257’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\201’ in program
prog.c:5: error: stray ‘\250’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\201’ in program
prog.c:5: error: stray ‘\231’ in program
prog.c:5: error: stray ‘\343’ in program
prog.c:5: error: stray ‘\202’ in program
prog.c:5: error: stray ‘\213’ in program
prog.c:7: error: stray ‘\350’ in program
prog.c:7: error: stray ‘\252’ in program
prog.c:7: error: stray ‘\262’ in program
prog.c:7: error: stray ‘\351’ in program
prog.c:7: error: stray ‘\241’ in program
prog.c:7: error: stray ‘\214’ in program
prog.c:7: error: stray ‘\357’ in program
prog.c:7: error: stray ‘\274’ in program
prog.c:7: error: stray ‘\227’ in program
prog.c:7: error: stray ‘\343’ in program
prog.c:7: error: stray ‘\203’ in program
prog.c:7: error: stray ‘\274’ in program
prog.c:7: error: stray ‘\357’ in program
prog.c:7: error: stray ‘\274’ in program
prog.c:7: error: stray ‘\224’ in program
prog.c:7: error: stray ‘\357’ in program
prog.c:7: error: stray ‘\274’ in program
prog.c:7: error: stray ‘\211’ in program
In file included from /usr/include/stdio.h:34,
                 from prog.c:9:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h:214: error: expected identifier or ‘(’ before ‘typedef’
stdout
Standard output is empty