1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
blondinia [14]
4 years ago
6

9.4 Code Practice:Question 1

Computers and Technology
1 answer:
Ymorist [56]4 years ago
4 0

Answer:

// Program is written in C++

// Comments are used for explanatory purpose

// Program starts here

#include<iostream>

using namespace std;

int main()

{

// Declare array

/* There are 18 characters between f and w. So, the array is declared as thus;*/

char letters [18];

// Initialise array index to 0

int i = 0;

// Get input

for(char alphs = 'f'; alphs<='w'; alphs++)

{

letters[i] = alphs;

// Increment array elements

i++;

}

// Print Array

cout<<"['";

for(int j = 0; j <18; j++)

{

if(j<17){

cout<<letters[j]<<"', '";

}

else

{

cout<<letters[j]<<"']";

}

}

return 0;

}

Explanation:

The above code declares a char array named letters of length 18. This is so because there are 18 characters from f to w (both inclusive). This is done using the following: char letters [18];

Index of array starts from 0; so, the next line initializes the array letters to 0 and prepares it for input.

The first for-loop statement is used to input characters to letter array. This done by iterating from 'f' to 'w' using variable alphs.

Outside the for loop; the statement cout<<"['"; prints ['

The next for loop prints f','g','h' ........ 'w']

Bring this two prints together, it gives the desired output

['f','g','h' ........ 'w']

You might be interested in
What decimal number does the bit pattern 0×0c000000 represent if it is a two's complement integer?
Cerrena [4.2K]
<span>The answer is </span><span>201326592.  The </span>decimal number that the bit pattern 0×0c000000 represent if it is a two's complement integer is 201326592.  
6 0
4 years ago
PLEASE I NEED HELP FAST
tankabanditka [31]

Answer:

your answer will be src=

7 0
3 years ago
Multiple client switches and routers have been set up at a small military base. The network team decided to implement Terminal A
Vikentia [17]

Answer:

a. device administration

Explanation:

Device Administration is a powerful API feature on the Android framework which was first introduced in Android version 2.2. It offers some features at the system level that enables some other key features such as the storage on a device, remotely wiping or enforcing password policies.

It is also utilized in uninstalling your application from the device or to capture a picture by the use of camera when screen is lock.

7 0
3 years ago
A __________ is software that helps a peripheral device establish communication with its host device.
vladimir2022 [97]

Answer:

Answer is Device Driver

3 0
3 years ago
Is my document folder located at taskbar​
KiRa [710]
Nope its located at your my computer
8 0
3 years ago
Other questions:
  • B. Find Addition of Binary Numbers: 1100112 + 11012
    11·1 answer
  • Windows 7 is used to run ____ software
    5·2 answers
  • A __________ is an entity that manages the use, performance, and delivery of cloud services, and negotiates relationships betwee
    6·1 answer
  • 10 disscused reasons why organisatoions use electronic spreedsheet​
    14·1 answer
  • Copyright laws were established :A. to allow authors to distribute their work while maintaining certain ownership rights. B. to
    8·1 answer
  • Which of the following is a strategy used to enhance communication in a presentation?
    14·1 answer
  • Write a Java program that prompts the user for an int n. You can assume that 1 ≤ n ≤ 9. Your program should use embedded for loo
    5·1 answer
  • Which function works best when you need to remove an element at a specific index in a list?
    5·2 answers
  • Which term accurately describes agile and devops
    5·1 answer
  • Plsssssssss help me​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!