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
eduard
3 years ago
6

Given the availability of an ifstream object named input, write the other statements necessary to read an integer into a variabl

e datum that has already been declared from a file called rawdata. Assume that reading that one integer is the only operation you will carry out with this file. (Note: write just the statements, do not define a main function.)
Computers and Technology
1 answer:
tatiyna3 years ago
4 0

Answer:

input.open("rawdata");

input>>datum;

input.close();

Explanation:

ifstream objects maintain a filebuf object as their internal stream buffer, and perform operations like input/output on the available associated files.

In above statements.

                            input.open("rawdata");

  • The associated file named rawdata is opened.

                            input>>datum;

  • The integer from the file is read into already declared variable datum.

                             input.close();

  • Input stream is closed.
You might be interested in
Why can a "group by" or "order by" clause be expensive to process? What is the difference between a where and having clause?
Zielflug [23.3K]

Answer and Explanation:

Group by clause bunches every one of the information coming back from the question in the predetermined gatherings.  

Order by clause will arrange the information either in rising  or in dropping order depending on the section data or column data.  

It is certainly a lengthy from execution perspective.  

Envision that the quantity of columns returned by the question are millions and gathering and arranging information from this parcel takes bigger execution time.  

The procedure is a lot of equivalent to on the off chance that you are approached to arrange the precisely coordinating names in a populace measurements, it requires colossal measure of handling time to make sense of the precisely coordinating names and after that arranging them as needs be.

The distinction between where and having clause:

'Where' and having clause in SQL are utilized to indicate separating conditions.  

There is a little contrast between these two clause and is given as under:  

WHERE clause is utilized while getting data (lines or rows) from the table, and the information which clears the condition will only be considered into  the result set.

HAVING clause is later utilized to channel a data summary or gathered data.  

On the off chance that the two clauses show up in SQL question, where clause will execute at first and afterward having clause is executed on the groups that returns the group clause.

8 0
4 years ago
Write a program that defines an interface having the following methods: addition, subtraction, multiplication, and division. Cre
Tatiana [17]

Hello, you haven't provided the programing language in which you need the code, I'll explain how to do it using Python, and you can follow the same logic to make a program in the programing language that you need.

Answer:

1. # -*- coding: utf-8 -*-

2. #Python  

3. class Calculator:

4.     def add(self):

5.         print(a + b)

6.     def sub(self):

7.         print(a - b)

8.     def mul(self):

9.         print(a * b)

10.     def div(self):

11.         print(a / b)

12.  

13. obj = Calculator()

14. choice = 1

15. while choice != 0:

16.     a = int(input("\nEnter first number: "))

17.     b = int(input("Enter first number: "))

18.      

19.     print("\n0. EXIT")

20.     print("1. DIVISION")

21.     print("2. ADDITION")

22.     print("3. SUBTRACTION")

23.     print("4. MULTIPLICATION")

24.      

25.     choice = int(input("\nEnter your choice: "))

26.     if choice == 1:

27.         obj.div()

28.     elif choice == 2:

29.         obj.add()

30.     elif choice == 3:

31.         obj.sub()

32.     elif choice == 4:

33.         obj.mul()

34.     else:

35.         break

Explanation:

  • From lines 1 to 12 we define the object with four methods, addition, subtraction, multiplication, and division. Each method contains the operation between two variables inside a print function
  • On line 13 we instantiate our class
  • On line 14 we declare the variable choice that is going to store the operation that the user wants to perform
  • On line 15 we declare a while loop, this is going to keep running the program until the user wants to exit
  • From line 16 to 18 we ask the user to enter two numbers
  • From line 19 to 24 we print the possible operation, assigning a number for each operation, this indicates to the user what number to press for what operation
  • On line 25 we ask the user for the operation
  • From lines 26 to 35 we check the user input an accordingly we call the corresponding method to performs the operation
7 0
3 years ago
What does a closed-envelope icon next to an e-mail message header indicate?\?
Fynjy0 [20]
That it was unread that’s what mine means
7 0
4 years ago
The ____ allows a core to communicate with other cpu components, such as the memory controller and other cores
Gnoma [55]
The appropriate response is Bus Interface Unit or BIU. The BIU gives different capacities, including era of the memory and I/O addresses for the exchange of information between outside the CPU, and the EU. 
The EU gets program direction codes and information from the BIU, executes these guidelines, and store the outcomes in the general registers. By passing the information back to the BIU, information can likewise be put away in a memory area or kept in touch with a yield gadget. Note that the EU has no association with the framework transports. It gets and yields every one of its information through the BIU.
4 0
4 years ago
#Write a function called one_dimensional_booleans.
deff fn [24]

Answer:

def one_dimensional_booleans(bool_list, use_and):

   

   is_all_true = True

   is_one_true = False

   

   if use_and:

       for b in bool_list:

           if b == False:

               is_all_true = False

               break

   

       if is_all_true:

           return True

       else:

           return False

   

   else:

       for b in bool_list:

           if b == True:

               is_one_true = True

               break

   

       if is_one_true:

           return True

       else:

           return False

Explanation:

Create a function named one_dimensional_booleans that takes two parameters, bool_list and use_and

Inside the function:

Set is_all_true as True and is_one_true as False. These will be used to check the list

If use_and is True, check each item in the bool_list. If one item is False, set the is_all_true as False and stop the loop. This implies that the list contains a False value. Then check the is_all_true. If it is True, return True. Otherwise, return False.

If use_and is False, check each item in the bool_list. If one item is True, set the is_one_true as True and stop the loop. This implies that the list contains a True value. Then check the is_one_true. If it is True, return True. Otherwise, return False.

5 0
4 years ago
Other questions:
  • A user has a PC with RAID configuration and reports slow computer performance. A technician uses the manufacture’s diagnostic so
    12·1 answer
  • Five indicators of computer illiteracy​
    13·1 answer
  • How do you know what memory to purchase for your computer?
    10·1 answer
  • _______is the equal distribution of visual weight on either side of an imaginary axis through the center of a design. A building
    6·2 answers
  • What are computers used for?
    14·2 answers
  • Pls help me!!!!!!!!!!!!!
    5·2 answers
  • What to do when you strip a screw
    10·2 answers
  • From what location are the 1st computer instructions available on boot up?
    10·2 answers
  • celia was working on a presentation. because she chose the fly in animation for her slide title, she has to use the same animati
    14·2 answers
  • What does a companys code of ehtics cover
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!