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
kirill115 [55]
3 years ago
13

Write a few statements that open a file called "greeting", write the message "hey!" to the file -- and then close it. declare an

y variables needed.
Computers and Technology
2 answers:
pshichka [43]3 years ago
6 0
C++:

int main () {

std::ofstream output {"greeting.txt"};
output << "hey!";
output.close();

return 0;
}
Shtirlitz [24]3 years ago
5 0

Answer:

The answer to this question can be given as:

Statement:

FILE *data1;     //create file pointer type variable

data1 = fopen("greeting","w");    //open file use fopen function

fprintf(data1,"hey!");    //print message.

fclose(data1);  //close file.

Explanation:

The description of the statement can be given as:

  • In this statement firstly we define a file pointer type variable that is "data1".This variable holds the file.  
  • Then we use the fopen() function that is used to open a file. In this function, we pass the file name and the mode to open the file.
  • Then we use the fprintf() function this function prints the value of the file.
  • In the last, we close the file, for close file we use fclose() function.
You might be interested in
What dose AUP stand for??????????
kipiarov [429]

Answer:

Acceptable Use Policy

Explanation:

A: Acceptable

U:Use

P:Policy

3 0
3 years ago
Read 2 more answers
Data_____is defined as the condition in which all of the data in the database are consistent with the real-world events and cond
mezya [45]

Answer:

d. integrity

Explanation:

Data integrity is defined as the condition in which all of the data in the database are consistent with the real-world events and conditions.

Data integrity can be used to describe a state, a process or a function – and is often used as a proxy for “data quality”. Data with “integrity” is said to have a complete or whole structure. Data integrity is imposed within a database when it is designed and is authenticated through the ongoing use of error checking and validation routines. As a simple example, to maintain data integrity numeric columns/cells should not accept alphabetic data.

4 0
3 years ago
Na2CO3 → Na2O + what
Katarina [22]

Answer:

CO3

Explanation:

6 0
3 years ago
Read 2 more answers
Broker Ray is closely acquainted with the Subdivision Heights neighborhood of his town. Over the year, Ray has made it a practic
spin [16.1K]
No multiple choice?
4 0
3 years ago
You need to perform maintenance on a router and need to temporarily reroute traffic through another office. which would be the b
Whitepunk [10]
<span>In order to perform maintenance on a router and need to temporarily reroute traffic through another office  the best way to perform this action would be to configure a static route on the router.
</span>By doing this, the router will use the manually-<span>configured routing entry to send the packets.</span>
3 0
3 years ago
Other questions:
  • #include &lt;iostream&gt;
    9·1 answer
  • The house belives that works should be compensated for the loss of jobs due to automation? Describe it in against motion of the
    15·1 answer
  • Websites whose URL’s contain tildes (~) are usually published by the government. TRUE or FALSE.
    8·2 answers
  • Yuygiihjiujjhuuuuykjyt​
    13·1 answer
  • What happens to a message when it is deleted?
    11·1 answer
  • Brainly is brainly am I correct ​
    11·2 answers
  • What is gained by increasing the ritation speed of a disk or cd?​
    9·1 answer
  • Write an algorithm to find the average of three numbers: 10, 20, 30
    7·1 answer
  • And, or, not are examples of boolean logic
    5·1 answer
  • Would my phone still work if I snapped it in half?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!