Skip to content

Commit 9f09763

Browse files
committed
updating readme with output
1 parent d3c303a commit 9f09763

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,82 @@ int main(int argc, char *argv[])
8888

8989
return 0;
9090
}
91+
```
92+
This program outputs the following.
93+
```
94+
Presidents in order of insertion
95+
soa {
96+
0, Abraham, Lincoln
97+
3, Barack, Obama
98+
2, George, Bush
99+
1, Bill, Clinton
100+
4, Donald, Trump
101+
5, Joe, Biden
102+
}
103+
104+
Presidents sorted by temporal order
105+
soa {
106+
0, Abraham, Lincoln
107+
1, Bill, Clinton
108+
2, George, Bush
109+
3, Barack, Obama
110+
4, Donald, Trump
111+
5, Joe, Biden
112+
}
113+
114+
Presidents sorted by first name
115+
soa {
116+
0, Abraham, Lincoln
117+
3, Barack, Obama
118+
1, Bill, Clinton
119+
4, Donald, Trump
120+
2, George, Bush
121+
5, Joe, Biden
122+
}
123+
124+
Presidents sorted by last name
125+
soa {
126+
5, Joe, Biden
127+
2, George, Bush
128+
1, Bill, Clinton
129+
0, Abraham, Lincoln
130+
3, Barack, Obama
131+
4, Donald, Trump
132+
}
133+
134+
Editing the first row to update Joe => Joseph
135+
soa {
136+
5, Joseph, Biden
137+
2, George, Bush
138+
1, Bill, Clinton
139+
0, Abraham, Lincoln
140+
3, Barack, Obama
141+
4, Donald, Trump
142+
}
143+
144+
Editing the third row to update Abraham Lincoln => George Washington
145+
soa {
146+
5, Joseph, Biden
147+
2, George, Bush
148+
1, Bill, Clinton
149+
0, George, Washington
150+
3, Barack, Obama
151+
4, Donald, Trump
152+
}
153+
154+
Summing first name lengths
155+
Total characters used in first names = 34
156+
157+
Sorting by number of characters in the last name.
158+
soa {
159+
2, George, Bush
160+
5, Joseph, Biden
161+
3, Barack, Obama
162+
4, Donald, Trump
163+
1, Bill, Clinton
164+
0, George, Washington
165+
}
166+
91167
```
92168
93169
Benchmark

0 commit comments

Comments
 (0)