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
liubo4ka [24]
2 years ago
6

"Because Standard Error and Standard Ouput represent the results of a command and Standard Input represents the input required f

or a command, only Standard Error and Standard Ouput can be redirected to/from a file. True or False
Computers and Technology
1 answer:
Genrish500 [490]2 years ago
8 0

Answer:

True

Explanation:

When ever we open a file using any programming language there can be only two possibilities that something from the file will be put in the output stream( here we assume that the file opening does not cause any error ) or there will be error like if the file does not exist or the syntax with which the file is being accessed is not according to the standards of language used.

You might be interested in
Write the code for invoking a method named sendObject. There is one argument for this method which is of type Customer. Assume t
kodGreya [7K]

Answer:

sendObject(John_Doe);

Explanation:

The above code has been written in Java.

Since the calling class is the same that declares it, to invoke the method, simply call its name with its argument(s) in a pair parentheses. The name of the method is "sendObject" and its argument is a reference to an object of type Customer saved in a variable called "John_Doe". This can be written as follows:

sendObject(John_Doe);

Hope this helps!

3 0
3 years ago
Is wireless or wired network faster??
bogdanovich [222]

Answer:

Wired

Explanation:

3 0
3 years ago
Read 2 more answers
Consider the code fragment below (with nested loops). int sum = 0;for (int i = 1; i < 5; i++) for (int j = 1; j <= i; j++)
sammy [17]

Answer:

Option d is the correct answer for the above question.

Explanation:

  • The first loop of the program has a second loop and then the statement. In this scenario, the second loop executes for the value of the first loop and the statement executes for the value of the second loop.
  • The first loop executes 4 times, Then the second loop or inner loop executes n times for the n iteration of the first loop, for example, 1 time for the first iteration of the first loop, 2 times for the second iteration of the first loop and so on.
  • Then the inner loop executes (1+2+3+4) iteration which gives the result 10 iterations.
  • The sum initial value is 0 and the "sum++", increase the value of the sum by 1.
  • So the value of the sum becomes 10 after completing 10 iterations of the inner for loop.
  • Hence the 10 will be the output. So the Option d is the correct answer while the other is not.
3 0
3 years ago
A method countDigits(int num) of class Digits returns the remainder when the input argument num(num > 0) is divided by the nu
sertanlavr [38]

Answer:

#include <iostream>

using namespace std;

class Digits

{

   public:

   int num;

   int read()       //method to read num from user

   {

       cout<<"Enter number(>0)\n";

       cin>>num;

       return num;

   }

   int digit_count(int num)  //method to count number of digits of num

   {

       int count=0;

       while(num>0)    //loop till num>0

       {

           num/=10;

           count++;   //counter which counts number of digits

       }

       return count;

   }

   int countDigits(int num)   //method to return remainder

   {

       int c=digit_count(num); //calls method inside method

       return num%c;  

   }

};

int main()

{

   Digits d;    //object of class Digits is created

   int number=d.read();   //num is read from user

   cout<<"\nRemainder is : "<<d.countDigits(number);  //used to find remainder

   return 0;

}

Output :

Enter number(>0)

343

Remainder is : 1

Explanation:

As program is missing to find errors , a logically write program is written to find the remainder when a number is divided by its number of digits. A class  Digits is constructed which has public variable num and methods read(), digit_count(), countDigits().

  • read() - This method reads value of num from the user and return num.
  • digit_count() - This method takes a integer as parameter and counts the number of digits of a number passed as argument. while loop is used to increement the counter until num<0. This returns the value of count.
  • countDigits() - This method takes a integer as a parameter and returns remainder when the argument is divided by number of  digits of argument. Number of digits is calculated by using method digit_count().

At last in main method , object of Digits class is created and its methods are used to find the output.

7 0
3 years ago
Which of the following are reasons why it is important to write readable code?
Julli [10]

Answer:

Readable code is easier to maintain.

Writing readable code saves time in the long run.

Readable code is easier to modify.

Readable code is fun to write.

Explanation:

Readability of a code means that how easy it is to read the code even if any person other than programmer reads the code. Different techniques like line breaks and indentation are used to make the code readable. the program follows an indentation pattern so it is easy and fun to write.

Hence,

it can be concluded that the true statements are:

Readable code is easier to maintain.

Writing readable code saves time in the long run.

Readable code is easier to modify.

Readable code is fun to write.

3 0
2 years ago
Read 2 more answers
Other questions:
  • When you park facing downhill and there is a curb, turn your wheels _____ the curb. When you park facing uphill and there is a c
    13·2 answers
  • A friend complains that she is always running out of money even though she “never buys anything expensive.” What advice would yo
    10·1 answer
  • write a c++program that allows the user to enter the last names of fivecandidates in a local election and the number of votes re
    15·1 answer
  • Header and Footer options are located in the _____ tab.
    7·1 answer
  • If some1 emails u and u want to know who it was how do u find that out
    10·2 answers
  • N, or central processing unit, is also known as the
    10·2 answers
  • According to the video, what kinds of projects would Computer Programmers be most likely to work on? Check all that apply.
    13·2 answers
  • Write a class Bug that models a bug moving along a horizontal line. The bug moves either to the right or left. Initially, the bu
    13·1 answer
  • After selecting the Slide Master tab (within the View tab), which actions can a user take to configure a slide master?
    8·1 answer
  • What is multimedia hard ware? Write any four examples of multimedia hardware. <br>​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!