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
How do i convert videos on the computer
mr Goodwill [35]

Answer:

An online tool or software.

Explanation:

Video conversion can be done using an online tool and software. If you choose to convert your videos by using an online tool, open any online tool and paste the link of the video or upload a video file from your computer, select the format you want and then click convert. Conversion takes a few seconds, and once the conversion is done, you can download the audio file. And if you choose to convert your videos by using the software, you have to download software, install it in your personal computer, and use it for conversion. In this process of transformation, you have to upload a video file from your computer. And if you do not need the output file format, some software can choose the setup automatically.

5 0
3 years ago
Which Application program saves data automatically as it is entered?
Andrei [34K]
The application program that saves data automatically as it is entered is the MS Access.
4 0
2 years ago
When I try to add a module into a device, Packet Tracer pop-ups a warning message saying "Cannot add a module when the power is
laiz [17]

plug it into a charger the go to I tunes and it should be there


4 0
3 years ago
Determine the type of sampling (random, stratified, systematic,
Ann [662]

Answer:

a. Convenience

b. Random

c. Stratified

d. Systematic

Explanation:

Types of sampling:

  • Random:

The selection of sample is arbitrary and each member has an equal chance of selection.

  • Convenience

This selection does not take probability of selection into account rather focuses on the convenience and proximity of the member for selection.

  • Systematic

An ordered system is decided to choose the members for this sample.

  • Cluster

This sampling plan divided the population into groups, called clusters. A cluster is then randomly selected from the selected population.

  • Stratified

The members of the population are divided into groups, called strata. A random sample is drawn from each strata.

6 0
3 years ago
How to fix the Run Time ERROR 3706 provider cannot be found? in ACCESS 2007
Nikitich [7]
A you are out of date

B re-install the application and reboot your computer
4 0
3 years ago
Other questions:
  • Which of the following actions should you take when turning left at an intersection?
    11·1 answer
  • g Define memory hierarchy. A. The rate at which information can be transferred from one place to another. B. Ordering storage sy
    8·1 answer
  • What is human data,
    8·1 answer
  • Kevin gets a call from a user who is trying to install a new piece of software. The user doesn’t have administrative rights, so
    10·1 answer
  • Code the function definition for aNonclassFunction, picking up co. aNonclassFunction has no return value.
    8·1 answer
  • What is the main difference between weathering, erosion and leaching​
    9·1 answer
  • What is Data rate?<br> What is BAUD RATE?<br> What is bandwidth?
    8·1 answer
  • Fifteen years ago, everyone didn't have a cell phone. Anyone developing an app would not have found many users. Today, the exist
    12·1 answer
  • Which of the following commands can be used to display socket information out to the terminal screen
    12·1 answer
  • In a typical office, biometric authentication might be used to control access to employees and registered visitors only. We know
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!