write a code for a given list thaThe procedure, whose implementation you are wri
ID: 3532505 • Letter: W
Question
write a code for a given list thaThe procedure, whose implementation you are writing, is intended to traverse the list, capturing the data therein. Each "node" in the list contains a single line of text and an "ordering" number. Your procedure is to write/print out the lines of text in the order indicated by that number. Thus the node with the order number zero will be printed first, followed by the node with order number 1, and so forth. The list is in random order. Numbering starts at zero and there are no missing numbers.t is scrambled by oder to print them out with the correct order by line number.using C programming.
Explanation / Answer
#include<stdio.h> #include<conio.h> typedef struct { char line[10][100]; int order[10]; } texts;texts z;
void main() { int j,k;
for(i=0;i<10;i++) // insert string gets(z.line[i]);
for(i=0;i<10;i++) scanf("%d",&z.order[i]); //insert order
j=0; for(k=0;k<10;i++) { for(i=0;i<10;i++)
{ if(order[i]==j); printf(z.line[i][]); j++; }}
getch();}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.