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
Dominik [7]
3 years ago
15

A phonebook typically lists the name, address, and telephone number of everyone living in an area. Write code defining a structu

re template that could be used to store this data. Assume that a name and address will be no more than 30 characters each, and that a telephone number has exactly seven digits.
Computers and Technology
1 answer:
nika2105 [10]3 years ago
4 0

Answer:

#include <stdio.h>

struct Phonebook {

   char name[30];

   char address[30];

   int phone_number;

};

int main()

{

   struct Phonebook pb = {"John Josh", "Newyork", 5551234};

   printf("Name: %s \n", pb.name);

   printf("Address: %s \n", pb.address);

   printf("Phone Number: %d \n", pb.phone_number);

   return 0;

}

Explanation:

- Define a struct called <em>Phonebook</em> that has two character arrays to store the value for name and address, and an integer value to hold the phone number

- In the main, define <em>pb</em> to represent a person and assign default values

- Print the name, address and phone number of the <em>pb</em> (person)

You might be interested in
Computer spreadsheet is a grid of​
Kruka [31]
Huh we’re, we’re is the computer screen shot
3 0
2 years ago
Which data type is 2.5?
Phoenix [80]

2.5 is a float.

Float stands for floating point. Floating point types are numbers with decimal places. I hope this helps!

6 0
2 years ago
Which is a solution that represents the majority of VPNs on the market and is commonly referred to as a VPN appliance?
Dafna1 [17]

Answer:

Remote access VPN

Explanation:

The solution that represents the majority of VPN's on the markets and is commonly referred to as a VPN appliance is the Remote access VPN

A remote access VPN is a type of VPN  that  works by creating a virtual channel (appliance ) between different devices for the purpose of exchanging data in an encrypted form. although this Tunnel passes through the public internet the Data exchanged are only accessible by the devices connected via the tunnel only .

The remote access VPN  is mostly used to connect an employee to the company's network therefore it represent the majority of VPNs in the market.

3 0
3 years ago
How to write a C++ program that allows a user to enter their rating of the three movies in the Dark Knight Trilogy and then disp
8_murik_8 [283]

The program is an illustration of arrays.

Arrays are used to hold multiple values in one variable.

The program in C++ where comments are used to explain each line is as follows:

#include <iostream>

using namespace std;

int main(){

   //This declares an array of three elements for the three ratings

   int ratings[3];

   //This initializes the sum of the ratings to 0

   int total = 0;

   //The following iteration gets input for the three ratings

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

       cin>>ratings[i];

       //This calculates the sum of all inputs

       total+=ratings[i];

   }

   //This declares and initializes the lowest and the highest ratings

   int lowest = ratings[0], highest = ratings[0];

   //This iterates through the array

   for(int i = 1; i<3;i++){

       //The following if condition determines the lowest rating

       if (lowest > ratings[i]){    lowest = ratings[i];        }

       //The following if condition determines the highest rating

       if (highest < ratings[i]){            highest = ratings[i];        }

   }

   //This prints the output header

   cout<<"The ratings are: ";

   //The following iteration prints the three ratings

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

       cout<<ratings[i]<<" ";   }

   //The prints the highest ratings

cout<<endl<<"Highest: "<<highest<<endl;

   //The prints the lowest rating

   cout<<"Lowest: "<<lowest<<endl;

   //The prints the average rating

cout<<"Average: "<<total/3<<endl;

   return 0;

}

At the end of the program, the ratings entered, the highest rating, the lowest rating, and the average of the ratings are printed.

See attachment for sample run

Read more about similar programs at:

brainly.com/question/13261254

8 0
2 years ago
In which type of attack does the user respond to several external communication requests? Harry wants to watch a movie online by
Shkiper50 [21]

Answer:

They normaly do that to put a virus on your device And hack into your private info like passwords and credit cards and stuff like that

Explanation:

Always watch a movie leagly

3 0
3 years ago
Other questions:
  • )1-bit sign, 8-bit exponent, 23-bit fraction and a bias of127 is used for ___________ Binary Floating PointRepresentation
    11·1 answer
  • Write a program that declares a constant named QUARTS_IN_GALLON which holds the number of quarts in a gallon (4). Also declare a
    8·1 answer
  • The first query is computationally less expensive than the second query. (Assume no indexes exist on release_date.) Query 1: SEL
    11·1 answer
  • While reading difficult content, you should always start witha.Surveying the chapterc.Reading the chapterb.Defining vocabulary w
    8·1 answer
  • 27. If X and Y are int type variables,
    14·1 answer
  • They have outlined their technical needs and have sent some of the documentation along with the potential provider's SLAs and te
    14·1 answer
  • GUYS THERE IS A HACKER IN BRAINLY PLEASE DONT PRESS ON THE WEBSITE THEY WILL HACK YOU.
    9·2 answers
  • You are designing an exciting new adventure game and you want to attempt to explain where items that are carried by the player a
    6·1 answer
  • ANs and WANs can be set up in several different shapes, also known as peripherals.
    6·1 answer
  • How does your ability to correctly count change affect the impression the customer has of you?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!