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
The rhythmic note that three beats is called a____half note.
aev [14]

Answer:

it is called a dotted half note

7 0
3 years ago
Read 2 more answers
If you know batch coding, can you see if there is anything wrong with this script, or if you can make any suggestions to modify
zzz [600]
There isn't an opening and closing parentheses for the else statement. PM me. I know a lot of batch...
8 0
4 years ago
Write any four common hardware devices​
marishachu [46]

Answer:

Input devices: For raw data input.

Processing devices: To process raw data instructions into information.

Output devices: To disseminate data and information.

Storage devices: For data and information retention.

8 0
3 years ago
A doorknob is an example of which simple machine?
Zarrin [17]
A doorknob is an example of a:
D. Wheel and Axle. 
I hope this helped ^_^
3 0
3 years ago
Read 2 more answers
Your boss calls you from his home to use the VPN connection you configured for him
prisoha [69]

Its not c or b. I think it's a. Im not sure tho..

7 0
3 years ago
Other questions:
  • Why should you limit what information is in your digital footprint?
    12·1 answer
  • Write any 2 differences between implicit variables and explicit variables.​Plz tell :' (
    10·1 answer
  • Write a program that prompts the user to enter a string (may contain spaces) and displays its last character. Enter s string: Pr
    13·1 answer
  • File Explorer contains ribbon tabs that can be used for various functions. Which ribbon tab provides options to open a new File
    11·1 answer
  • How does applying Fontworks effects to text on an advertising flyer change the text?
    8·1 answer
  • How can an individual find career data?
    13·1 answer
  • You are going to write a program for Computer test which will read 10 multiple choice questions from a file, order them randomly
    11·1 answer
  • The___is a waterproof fabric that is placed around your camera
    7·1 answer
  • [C++ for array week|
    8·1 answer
  • Pls help me pls I’m struggling
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!