1. Show me the world by CodeChum Admin Hi Programmer, I'm planning to impress my crush. It seems that she likes nerd stuff so what I'm planning to do is I want to show her all of the world array I...





1. Show me the world


by CodeChum Admin






Hi Programmer, I'm planning to impress my crush. It seems that she likes nerd stuff so what I'm planning to do is I want to show her all of the world array I have.



Can you help me with this?




Instructions:



  1. In the code editor, you are provided with the main() function that declares an array with initial values and calls the display() function.


  2. This display() function hasn't been declared and defined yet. This is your task. The details of this function are:


    1. Return type - void

    2. Name - display


    3. Parameters


      1. int* - an array

      2. int - the size of an array











Output





Element·at·index·0:·1

Element·at·index·1:·3

Element·at·index·2:·2

Element·at·index·3:·4

Element·at·index·4:·5

Element·at·index·5:·7

Element·at·index·6:·6

Element·at·index·7:·8

Element·at·index·8:·9

Element·at·index·9:·11

Element·at·index·10:·100

Element·at·index·11:·13

Element·at·index·12:·0

Element·at·index·13:·14

. . .



main.c<br>+ c<br>Test Cases<br>Output<br>1 #include<stdio.h><br>Element at index 0: 1<br>3 // TODO: Declare the display() function here<br>CE Run Tests<br>Element at index 1: 3<br>4<br>Element at index 2: 2<br>int main(void) {<br>7 -<br>Element at index 3: 4<br>int world[100] = {<br>1,3,2,4,5,7,6,8,9,11,<br>100,13,0,14,16,17,3,18,20,10,<br>12,8,15,14,-5,17,19,18,1,9,5,<br>10,13,11,14,16,22,0,18,20,3,<br>99,13,15,14,22,17,19,0,23,2,<br>12,13,15,22,16,17,56,18,44,99,<br>2,13,22,14,16,89,19,69,101,34,<br>12,22,15,14,78,17,69,18,2,33,<br>4,13,77,7,10,17,19,91,4,22,<br>12,98,15,14,15,17,19,18,7<br>};<br>Test<br>Element at index 4: - 5<br>8<br>O Case<br>Hidden<br>Element at index 5: 7<br>9.<br>1<br>10<br>Element at index 6: 6<br>11<br>Element at index 7: 8<br>12<br>Element at index 8: 9<br>13<br>Element at index 9: 11<br>14<br>15<br>Element at index 10: 100<br>16<br>Element at index 11: 13<br>17<br>Element at index 12: 0<br>18<br>19<br>20<br>display (world, 100);<br>Score: 0/10<br>21<br>22<br>return 0;<br>

Extracted text: main.c + c Test Cases Output 1 #include Element at index 0: 1 3 // TODO: Declare the display() function here CE Run Tests Element at index 1: 3 4 Element at index 2: 2 int main(void) { 7 - Element at index 3: 4 int world[100] = { 1,3,2,4,5,7,6,8,9,11, 100,13,0,14,16,17,3,18,20,10, 12,8,15,14,-5,17,19,18,1,9,5, 10,13,11,14,16,22,0,18,20,3, 99,13,15,14,22,17,19,0,23,2, 12,13,15,22,16,17,56,18,44,99, 2,13,22,14,16,89,19,69,101,34, 12,22,15,14,78,17,69,18,2,33, 4,13,77,7,10,17,19,91,4,22, 12,98,15,14,15,17,19,18,7 }; Test Element at index 4: - 5 8 O Case Hidden Element at index 5: 7 9. 1 10 Element at index 6: 6 11 Element at index 7: 8 12 Element at index 8: 9 13 Element at index 9: 11 14 15 Element at index 10: 100 16 Element at index 11: 13 17 Element at index 12: 0 18 19 20 display (world, 100); Score: 0/10 21 22 return 0;
main.c<br>> + c<br>Test Cases<br>Output<br>4<br>CE Run Tests<br>6 - int main(void) {<br>7 -<br>Element at index 0: 1<br>int world[100] = {<br>1,3,2,4,5,7,6,8,9,11,<br>100,13,0,14,16,17,3,18,20,10,<br>12,8,15,14,-5,17,19,18,1,9,5,<br>10,13,11,14,16,22,0,18,20,3,<br>99,13,15,14,22,17,19,0,23,2,<br>12,13,15,22,16,17,56,18,44,99,<br>2,13,22,14,16,89,19,69,101,34,<br>12,22,15,14,78,17,69,18,2,33,<br>4,13,77,7,10,17,19,91,4,22,<br>12,98,15,14,15,17,19,18,7<br>};<br>Element at index 1: - 3<br>Element at index 2: 2<br>8<br>9.<br>Element at index 3: 4<br>Test<br>10<br>Element at index 4: 5<br>11<br>Case<br>Hidden<br>Element at index 5: 7<br>12<br>1<br>Element at index 6: 6<br>13<br>14<br>Element at index 7: 8<br>15<br>Element at index 8: -9<br>16<br>Element at index 9: 11<br>17<br>Element at index 10: - 100<br>18<br>19<br>Element at index 11: 13<br>20<br>display(world, 100);<br>Element at index 12: 0<br>21<br>22<br>return 0;<br>23 }<br>Score: 0/10<br>24<br>25 // TODO: Define the display() function here<br>

Extracted text: main.c > + c Test Cases Output 4 CE Run Tests 6 - int main(void) { 7 - Element at index 0: 1 int world[100] = { 1,3,2,4,5,7,6,8,9,11, 100,13,0,14,16,17,3,18,20,10, 12,8,15,14,-5,17,19,18,1,9,5, 10,13,11,14,16,22,0,18,20,3, 99,13,15,14,22,17,19,0,23,2, 12,13,15,22,16,17,56,18,44,99, 2,13,22,14,16,89,19,69,101,34, 12,22,15,14,78,17,69,18,2,33, 4,13,77,7,10,17,19,91,4,22, 12,98,15,14,15,17,19,18,7 }; Element at index 1: - 3 Element at index 2: 2 8 9. Element at index 3: 4 Test 10 Element at index 4: 5 11 Case Hidden Element at index 5: 7 12 1 Element at index 6: 6 13 14 Element at index 7: 8 15 Element at index 8: -9 16 Element at index 9: 11 17 Element at index 10: - 100 18 19 Element at index 11: 13 20 display(world, 100); Element at index 12: 0 21 22 return 0; 23 } Score: 0/10 24 25 // TODO: Define the display() function here
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here