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
umka21 [38]
3 years ago
8

Write a program to read a record from a binary file

Computers and Technology
1 answer:
BlackZzzverrR [31]3 years ago
4 0

Answer:

To read a record from binary file in C++ use read method.

Syntax: ifstream& write(const char*, int);

Explanation:

Algorithm:

Begin

  Create a structure Student to declare variables.

  Open binary file to write.

  Check if any error occurs in file opening.

  Initialize the variables with data.

  If file open successfully, write the binary data using write method.

     Close the file for writing.

  Open the binary file to read.

  Check if any error occurs in file opening.

  If file open successfully, read the binary data file using read method.

     Close the file for reading.

  Check if any error occurs

  Print the data.

End

You might be interested in
What is a computer system?
klio [65]
A system of interconnected computers that share a central storage system and various peripheral devices such as a printers, scanners, or routers. Each computer connected to the system can operate independently, but has the ability to communicate with other external devices and computers

<span>Read more: http://www.businessdictionary.com/definition/computer-system.html</span>
4 0
3 years ago
The power relationship on a transformer states that O Power in = power out + loss O Power in = 1/2 power out (Power in = 2 x pow
lions [1.4K]

Answer:

D

Explanation:

5 0
3 years ago
What field is used to send a copy of an e-mail message?
vampirchik [111]
The CC field is used to send a copy of an email. CC stands for carbon copy.
7 0
3 years ago
What's sprite and a costume?
astra-53 [7]

Answer:

Costumes are the artwork associated with a sprite. Sprites are things that move, so they can have multiple costumes. Backdrops are the artwork for the stage. The stage doesn't move, but can have multiple backdrops.

Sprites are used to make complex and interesting animations and games. A sprite is able to store images or animations with a set of properties such as position and visibility. Sprites also have properties to report interactions with other sprites or the mouse.

3 0
3 years ago
Write the pseudocode for a function named timesTen that accepts an Integer argument. When the function is called, it should retu
iren [92.7K]

Answer:

function timesTen (number):

   return number * 10

n = int(input("Enter an integer: "))

print(str(n) +"x10 is equal to: " + str(timesTen(n)))

Explanation:

Pseudocode is the representation of an algorithm. It shows the steps of the algorithm combination of the English and programming language.

In the pseudocode, we said we will be defining a function called timesTen that takes one parameter and returns the value of its parameter multiplied times 10.

In the main, we asked the user to enter a number. Then, we called the function with that number, and print the result.

3 0
3 years ago
Other questions:
  • Identify 3 ways mobile phone could be used to contact a bank apart from making a phone call to the bank
    12·1 answer
  • Observe the things at Home in which you are using binary
    7·1 answer
  • You want to create Web pages that can easily adapt to and serve multimedia content to smartphones, tablets, gaming devices and s
    13·1 answer
  • How does emotional awareness help you with non-verbal communication?
    13·2 answers
  • Match the item to the type.
    11·1 answer
  • Which symbol is at the beginning and end of a multiline comment block? &amp;&amp;&amp; """ %%% ###
    5·1 answer
  • HELP PLZZZZZZZZ!!!!!!!!!!!
    14·1 answer
  • Definition of digital
    9·2 answers
  • Select the correct answer from each drop-down menu. A company is recruiting for a web designer. What kind of candidate should th
    14·2 answers
  • What is ‘situational awareness” in game design?please answer in a full sentence!
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!