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
Molodets [167]
3 years ago
12

Assume there are 15 students registered for a history class. You will need to declare an array of the StudentType structure to c

ontain data for all students and another character array with 20 elements to hold the answer key to a test. The history teacher at your school needs help in grading a True/False test. Define a StudentType structure for that.
Computers and Technology
1 answer:
andrezito [222]3 years ago
3 0

Answer:

#include <iostream>

using namespace std;

struct StudentType{

   string studentName;

   int studentId;

}

int n;

char answer[20];

int main(){

   cout<< "Enter the size of the array: ";

   cin >> n;

   StudentType *student = new StudentType(n);

   for (int i = 0; i < n; i++){

       int name;

       int number;

       cin>> name;

       cin >> number;

       student[i].studentName = name;

       student[i].studentId = number;

   }

   for (int i = 0; i < 20; i++){

       cout<< "Enter answers: ";

       cin >> ans;

       answer[i] = ans;

   }

}

Explanation:

The C++ source code has three global variables namely, answer which is an array of character data type, StudentType which is a structure data type and the integer variable n. The main function declares and initializes the dynamic-spaced student array of the structure datatype with the n variable.

You might be interested in
Does anybody know if that apple watch is actually worth what it costs?
monitta
I is definetly not it is over priced and there ar emany differnent versions of the same thing for cheaper
6 0
3 years ago
Read 2 more answers
What is the phase of a waveform ?
allsm [11]

In sinusoidal functions or in waves, "phase" has two different, but closely related, meanings. One is the initial angle of a sinusoidal function at its origin and is sometimes called phase offset or phase difference. Another usage is the fraction of the wave cycle that has elapsed relative to the origin.

6 0
3 years ago
Please answer that and i'll gave you branlliest
juin [17]

num = float(input('Enter a number: '))

if num > 45.6:

   print('Greater than 45.6')

I wrote my code in python 3.8. I hope this helps.

7 0
3 years ago
31. Explain what the program does. Write out the output 20 PRINT "Hellooo00000000000, world!" 30 PRINT "I'm learning about comma
inna [77]

o_num = input ("Please enter the amount of \"o\": ")

zero_num = input ("Please enter the amount of zeros: ")

i = 0

while i < o_num and i < zero_num:

repeat_o = "Hell" + o_num

repeat_zero = repeat_o + zero_num

i+=1

print (repeat_zero)

3 0
3 years ago
An image can be copied from the Internet or another location and pasted into Paint.
Furkat [3]
It is true. You can copy and paste a picture into microsoft paint, using either the right click task bar or Ctrl c-ctrl v, you can then adjust the image to the desired size.
5 0
3 years ago
Other questions:
  • In dt.py, you will implement a basic decision tree classifier for
    5·1 answer
  • Business ethics the intranet is a private piece of a company's internet network that is made available to computers and/or vendo
    11·1 answer
  • Webster defines risk as "the possibility of loss or injury". Therefore, driving a motor vehicle is a risk.
    12·1 answer
  • Does anyone know the point of gradpoint?
    8·1 answer
  • A solid understanding of __________ is the foundation of verbal communication
    7·1 answer
  • What are two types of crust on the earths surface
    15·2 answers
  • Could someone please help?​
    10·1 answer
  • Are there any Potential Dangers in Artificial Intelligence?
    11·2 answers
  • rue or false: The first web browser was introduced to the public in the 1970s and started the explosive growth of the Internet i
    15·1 answer
  • STM-1 contains 63 primary 2-Mbps data streams and each of them contains 30 time slots for speech.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!