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
dybincka [34]
4 years ago
12

Declare a structure whose tag name is Server and that contains the following fields: manufacturer, a string, model and serialnum

, both also strings, year, an int, clockSpeed, a double, cores, an int, ram, an int and finally storage an int. In addition, declare a array named emp of 30 of these structures. Assign the value 12 to the last element of the arr field of the last element of emp. Assign 3.5 to the d field of the first emp element . Assign the string Hello to the k'th element of emp (assume k has been declared as an integer variable and assigned a value in the range of the array elements ).
Computers and Technology
1 answer:
elena55 [62]4 years ago
3 0

Answer:

Hi there Smartcreeper! You can declare structs in C++ to answer this question. Please refer to my explanation below.

Explanation:

A struct in C++ allows us to define a structure with different data types into a single collection. The "emp[30];" at the end of the struct declares an array of the Server structure of size 30. The assignments to different components as required in the question are made and printed out to the console to verify.

#include <iostream>

#include <string>

#include <sstream>

using namespace std;

struct Server {

   string manufacturer;

   string model;

   string serialnum;

   int year;

   double clockSpeed;

   int cores;

   int ram;

   int storage;

} emp[30];

int main()

{

   int k = 5;  

   int d = 2;

   emp[30].storage = 12;

   emp[d].manufacturer = 3.50;

   emp[k].model = "Hello";

   cout << emp[30].storage << endl;

   cout << emp[d].manufacturer << endl;

   cout << emp[k].model << endl;

}

You might be interested in
an images scanned from a CD cover does not have to be cited because you didn't find the image on the internet True or false
ruslelena [56]

Answer:

False

Explanation:

When searching on the internet, I found flashcards containing this information.

6 0
3 years ago
Pls awnser I will mark brainliest math
andrew11 [14]
It’s 34....!!!! i did this before
8 0
4 years ago
Read 2 more answers
While an image is still being editing, it is best to save it as a PDF. Group of answer choices True False
Readme [11.4K]

Answer:

f

Explanation:

6 0
3 years ago
Read 2 more answers
Which institution of the European Union (EU) is the executive body?
zhannawk [14.2K]
<span>A.Council of the European Union</span>
7 0
4 years ago
Instance data for a Java class Group of answer choices are limited to primitive types (e.g., int, float, char) are limited to St
Arisa [49]

Question

Instance data for a Java class

a. Are limited to primitive types (e.g., int, float, char)

b. Are limited to Strings

c. Ae limited to objects(e.g., Strings, classes defined by other programmers)

d. May be primitive types or objects, but objects must be defined to be private

e. May be primitive types or objects

Answer:

e. Instance data for a Java class may be primitive types or objects.

Explanation:

Instance data are defined as those entities that make up the class.

Instances may be of any available data type, whether it is primitive or it is an object.

Instances may also be public and they may be private.

By using objects as instance data, it permits the class to be built upon other classes. This relationship where a class has instance data that are other classes is known as a has a relationship.

8 0
4 years ago
Other questions:
  • What are some of the causes for error 1921 when updating?
    11·2 answers
  • ______________ in SONET are analogous to the ________________ of T-carriers.
    7·1 answer
  • Match each of the following steps of SDLC development to its position in the development process.
    15·1 answer
  • What are the differences betweenCONS, LIST, and APPEND?
    5·1 answer
  • How does Accenture help companies harness the power of data to achieve optimal business outcomes?
    9·2 answers
  • Most widely used insulator for splices of smaller wires
    13·1 answer
  • What does a class do?
    10·1 answer
  • How do we find the time complexity for this algorithm?
    6·1 answer
  • Adding a border to an image is one way to manipulate media to spice up a project. Where do you find the Picture Styles command t
    15·1 answer
  • Beth is a software developer who is focused on identifying early-stage interface problems. Beth addresses the dimension of usabi
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!