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
horsena [70]
3 years ago
11

Which of the following statements opens the file info.txt for both input and output? a) dataFile.open("info.txt", ios::in &&

amp; ios::out); b) dataFile.open("info.txt", ios::in , ios::out); c) dataFile.open("info.txt", input || output); d) dataFile.open("info.txt", ios::in | ios::out);
Computers and Technology
2 answers:
torisob [31]3 years ago
6 0

Answer:

D

Explanation: Choice D

azamat3 years ago
3 0

Answer:

Correct answer is D

Explanation:

open is a function in c++ programming language used to interact with files.The function takes two parameters as input

  1. File name
  2. mode

File Name

File name is a string name of file to be opened.This is a compulsory parameter for open method.

Mode

Mode is an optional parameter in open function.Following are the accepted values of mode parameter

Prefix ios:: is added to start of each

  1. in (Open file in input mode for writing data to file)
  2. out (Open file in output / read-only mode to read data from file)
  3. binary (Open file in binary format)
  4. ate (Set the starting point of file to the end of file. Default starting point of file is start of file)
  5. "trunc" (If file is opened multiple times all previous data is replaced with new data)
  6. app (All operations of output are performed the end of file)

Use | operator to use multiple modes at a time.

You might be interested in
What is most likely to happen to the purchasing power of money over time?
natima [27]

Answer:

A

Explanation:

6 0
2 years ago
100+20000000 please give answer and win iPhone 11 pro​
Eddi Din [679]

Answer:

20000100

Explanation:

8 0
2 years ago
Program for bit stuffing...?
Olegator [25]

Answer: Program for bit stuffing in C

#include<stdio.h>

      int main()

    {    

          int i=0,count=0;

          char data[50];

          printf("Enter the Bits: ");

          scanf("%s",data);            //entering the bits ie. 0,1  

          printf("Data Bits Before Bit Stuffing:%s",databits);

          printf("\nData Bits After Bit stuffing :");

          for(i=0; i<strlen(data); i++)

              {

              if(data[i]=='1')

                     count++;

              else

                     count=0;

                printf("%c",data[i]);

             if(count==4)

                {

                          printf("0");

                          count=0;

                 }

             }

    return 0;

 }

Explanation:

bit stuffing is the insertion of non-information bits during transmission of frames between sender and receiver. In the above program we are stuffing 0 bit after 4 consecutive 1's. So to count the number of 1's we have used a count variable. We have used a char array to store the data bits . We use a for loop to iterate through the data bits to stuff a 0 after 4 consecutive 1's.

4 0
3 years ago
How is the number 110 written when expanded out to place values in the base 2 (binary) number system?
Vinil7 [7]
C is correct answer ......
3 0
3 years ago
Suppose you are a customer who wants to have a computer repaired. List five main characteristics that you would want to see in y
tatuchka [14]

Answer:

We see the five main features in the computer repair guy is given below

Explanation:

  • The guy must personal computer repair support it means to repair the system in a very efficient manner.
  • The guy must Computer service professional.it means it must provide the service at any time.
  • The guy must Professional Retail Partner.
  • The guy must repair the Desktop.  
  • The guy must be Customer care Technical support.It means it giving the help desk when needed
6 0
3 years ago
Other questions:
  • Which key removes all data from an active cell with one click
    7·2 answers
  • The ____ section of the project plan should describe the major project functions and activities and identify those individuals w
    7·1 answer
  • What is data. Explain it in brief
    11·2 answers
  • Robin ensures that she is always available if anyone in the team needs her. Which quality is shown by robin?
    9·2 answers
  • How is the cia triad used to evaluate encryption methods?
    6·1 answer
  • Why is manual coding the best way to learn HTML?
    11·1 answer
  • Hvhblfffffffff<br> eafafaefafsa
    9·2 answers
  • The following code is intended to test whether the int variable num is less than 10, and if so print a warning and set it to 10.
    6·1 answer
  • One of your suppliers has recently been in the news. Workers complain of long hours, hot and stuffy workrooms, poor lighting, an
    15·1 answer
  • PlanthelogicforLungi’sapplicationusingpseudocode.Thelogicneedstosatisfythefollowingneeds:TheapplicationwillneedtoallowLungitoen
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!