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
nekit [7.7K]
3 years ago
7

Each student has a record on a file consisting of the following data: Student last name, Student ID (numeric), GPA (a decimal nu

mber), major (a 3 digit code). a. Define a structure that could be used to process this data record. b. Declare an instance of this structure. c. Write ONE cout statement to show the Student name on the screen. HTML EditorKeyboard Shortcuts
Computers and Technology
1 answer:
slavikrds [6]3 years ago
7 0

Answer:

#include<iostream>

using namespace std;

struct student {

   string name;

   int id;

   float gpa;

   int major;

};

int main() {

   student student1;

   student1.name="Patil";

   student1.id=1;

   student1.gpa=9.80;

   student1.major=123;

   cout<<"First student last name: "<<student1.name;

}

Explanation:

A struct is a container or data structure in C and C++ that holds data that describes or represents an object. It is defined with the struct keyword. Just like a class constructor method, the struct is called with the struct name and the instance name of the struct.

The student struct above is used to create an instance of students registered in a school. The first student struct instance is the 'student1'.

You might be interested in
Write a program to ask for a Cartesian coordinate x,y. Your program should read in an x value and a y value and then inform the
AnnZ [28]

Answer:

The program in Python is as follows:

x = int(input("x: "))

y = int(input("y: "))

if x == 0:

   if y == 0:        print("Origin")

   else:        print("y axis")

elif x>0:

   if y > 0:        print("First Quadrant")

   elif y < 0:        print("Fourth Quadrant")

   else:        print("x axis")

elif x < 0:

   if y > 0:        print("Second Quadrant")

   elif y < 0:        print("Third Quadrant")

   else:        print("x axis")

Explanation:

These get input for x and y

<em>x = int(input("x: "))</em>

<em>y = int(input("y: "))</em>

If x is 0

if x == 0:

<em>............ and y is 0, then the point is at origin</em>

   if y == 0:        print("Origin")

<em>............ and y is not 0, then the point is on y-axis</em>

   else:        print("y axis")

If x is greater than 0

elif x>0:

<em>............ and y is greater than 0, then the point is at in the first quadrant</em>

   if y > 0:        print("First Quadrant")

<em>............ and y is less than 0, then the point is at in the fourth quadrant</em>

   elif y < 0:        print("Fourth Quadrant")

<em>............ Otherwise, the point is on the x axis</em>

   else:        print("x axis")

If x is less than 0

elif x < 0:

<em>............ and y is greater than 0, then the point is at in the second quadrant</em>

   if y > 0:        print("Second Quadrant")

<em>............ and y is less than 0, then the point is at in the third quadrant</em>

   elif y < 0:        print("Third Quadrant")

<em>............ Otherwise, the point is on the x axis</em>

   else:        print("x axis")

6 0
3 years ago
Emily has to create an audio-visual presentation on animated movies. Which input device will she be LEAST likely to use while cr
tiny-mole [99]
Joystick? It would be helpful if you listed the choices :)
3 0
3 years ago
A(n) _______ class address supports 65,000 hosts on each of 16,000 networks, and allows three sections of the IP address to be d
Pepsi [2]

Answer:

Class B address.

Explanation:

A network is an entirety of devices (more than one) connected to communicate with which other and share resources. It uses logical IP addresses to locate and route packets to different modes within a network and to remote networks.

There are two versions of IP addresses, they are IP version 4 and 6. The IPv4 is classified into three main category.

Class A: 10.0.0.0 to 10.255.255.255

Class B: 172.16.0.0 to 172.31.255.255

Class C: 192.168.0.0 to 192.168.255.255

The IP address is a 32 bit address with four separate octet ( eight bits). The Class B has 16,000 networks and 65,000 host each gotten from the binary bits after the second octet network address.

8 0
3 years ago
Heya!!<br><br>•DEFINE DATA SCIENCE??<br>(∩_∩)<br><br>#kavya#<br>​
anastassius [24]

Answer:

Explanation:

Data science defined

Data science encompasses preparing data for analysis, including cleansing, aggregating, and manipulating the data to perform advanced data analysis. Analytic applications and data scientists can then review the results to uncover patterns and enable business leaders to draw informed insights.

5 0
3 years ago
If I wanted to include a picture of a dog in my document, I could use
11Alexandr11 [23.1K]

Answer:

Online Pictures

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • NEED HELP(10 POINTS) PLEASE HELP MATH
    8·2 answers
  • Assume that you are able to do an exhaustive search for the key to an encrypted message at the rate of 100 Million trials per se
    12·1 answer
  • _______ testing is a customer test that involves placing the product within the firm to see how it performs in different applica
    8·1 answer
  • 01110111 01101000 01100001 01110100 00100000 01101001 01110011 00100000 00110001 00101011 00110001
    7·1 answer
  • Which device makes computers that are connected to separate segments appear and behave as if they're on the same segment? (Pleas
    11·1 answer
  • Consider the problem of making change for n cents using the fewest number of coins. Assume that each coins value is an integer.
    7·1 answer
  • How do ACLs work on a router?
    14·1 answer
  • Jason has decided to use his name on all the images to protect them from misuse. He has also decided to use the logo of his comp
    15·2 answers
  • . Find the supplements of : 150' and 70°​
    8·1 answer
  • Write the code for the following problem.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!