C PROGRAMMING ONLY) 1. Spell-it-out! by CodeChum Admin Are you intimidated with complicated words? Don't be! The trick is to break it down letter by letter!   Let’s create a program that prints out the character in the array index indicated by the input integer. For example, if the array has 3 character elements, 'j', 'r', and 'd', and the inputted integer value is 1, then we print 'r' because 'r' is found at index 1.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 4PP: (Numerical) Write and test a function that returns the position of the largest and smallest values...
icon
Related questions
Question

(C PROGRAMMING ONLY)

1. Spell-it-out!
by CodeChum Admin

Are you intimidated with complicated words? Don't be! The trick is to break it down letter by letter!

 

Let’s create a program that prints out the character in the array index indicated by the input integer. For example, if the array has 3 character elements, 'j', 'r', and 'd', and the inputted integer value is 1, then we print 'r' because 'r' is found at index 1.

 

Instructions:

In the code editor, you are provided with an array of characters (or a string).
Your task is to ask the user for an integer input which represents the index and then print out the character of the string found at that index.
Input

1. Index of the array

Output

Enter the index: 4
r

main.c
+
1 #include<stdio.h>
2
3 int main() {
char array[100] ="supercalifragilisticexpialidocious";
return 0;
}
>
Transcribed Image Text:main.c + 1 #include<stdio.h> 2 3 int main() { char array[100] ="supercalifragilisticexpialidocious"; return 0; } >
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Array
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT