help!! i don't know how to get the same output. here's the source code in c language:   #include // TODO: Declare the display() function here int main(void) {     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     };     display(world, 100);          return 0; } // TODO: Define the display() function here

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

help!! i don't know how to get the same output. here's the source code in c language:

 

#include<stdio.h>

// TODO: Declare the display() function here


int main(void) {
    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
    };

    display(world, 100);
    
    return 0;
}

// TODO: Define the display() function here

main.c
1. Show me the world
1 #includestdio.h>
by CodeChum Admin
2
// TODO: Declare the display) function here
4
3
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.
6" int nain(void) {
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
Can you help me with this?
9
10
11
Instructions:
12
13
1. In the code editor, you are provided with the main() function
14
that declares an array with initial values and calls the
15
display() function.
16
2. This display() function hasn't been declared and defined yet.
17
18
This is your task. The details of this function are:
19
1. Return type - void
display (world, 100);
20
2. Name - display
21
3. Parameters
22
return 0;
23 }
1. int* - an array
24
2. int - the size of an array
25 / TODO: Define the display () function here
Output
Element -at index 8: 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: 10e
Element at index 11: 13
Element at index 12: e
Element at index 13: 14
Transcribed Image Text:main.c 1. Show me the world 1 #includestdio.h> by CodeChum Admin 2 // TODO: Declare the display) function here 4 3 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. 6" int nain(void) { 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 Can you help me with this? 9 10 11 Instructions: 12 13 1. In the code editor, you are provided with the main() function 14 that declares an array with initial values and calls the 15 display() function. 16 2. This display() function hasn't been declared and defined yet. 17 18 This is your task. The details of this function are: 19 1. Return type - void display (world, 100); 20 2. Name - display 21 3. Parameters 22 return 0; 23 } 1. int* - an array 24 2. int - the size of an array 25 / TODO: Define the display () function here Output Element -at index 8: 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: 10e Element at index 11: 13 Element at index 12: e Element at index 13: 14
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education