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
sineoko [7]
3 years ago
7

What happens when an arithmetic operator is applied to non-arithmetic data types such as Boolean or character

Computers and Technology
1 answer:
Blababa [14]3 years ago
3 0

Answer:

Following are the code to this question:

#include<iostream>//defining header file

using namespace std;

int main()//defining main method

{

bool a = true;//defining bool variable that holds true value

bool b = false;//defining bool variable that holds false value

cout<<a+b<<endl;//using print method to add bool value

cout<<a-b<<endl;//using print method to subtract bool value

cout<<a*b<<endl;//using print method to multiply bool value

return 0;

}

Output:

1

1

0

Explanation:

In this code, Firstly we import the header file, and in the next step, the main method is defined, in this, two bool variable "a, b" is declared, that holds true and false value respectively, and in the next step, three print method is declared that adds, subtract, and multiply the given value and use print its calculated value.

You might be interested in
import java.util.ArrayList; // Needed for ArrayList class /** This program demonstrates how to store BankAccount objects in an A
slega [8]

Answer:

import java.util.ArrayList; // Needed for ArrayList class

/** This program demonstrates how to store BankAccount objects in an ArrayList. */

// Class ArrayListDemo6 is defined

public class ArrayListDemo6 {

// main method that begin program execution

public static void main(String[] args) {

// Create an ArrayList to hold BankAccount objects.

// The arraylist is called list

ArrayList list = new ArrayList();

// Add three BankAccount objects to the ArrayList.

list.add(new bankAccount(100.0)); list.add(new bankAccount(500.0)); list.add(new bankAccount(1500.0)); // Display each item using a for loop

for (int index = 0; index < array.size(); index++)

{ BankAccount account = list.get(index);

System.out.println("Account at index " + index + "\nBalance: " + account.getBalance());

}

}

}

Explanation:

The code is written in Java and more comments has been added to make it more explanatory.

The code snippet is a demonstration on Arraylist.

First Arraylist is imported. Then, ArrayListDemo6 class is defined. Then the main method which begin program execution.

Inside the main method, a new Arraylist is created called list.

Then we add three BankAccount object to the list.

Lastly, we use a for loop to display each added BankAccount object.

7 0
3 years ago
You recently started working part-time in a retail store, and are learning about the reading devices your store uses.Your store
slega [8]

Answer:

Laser beams.

Explanation:

Recently, that user has began functioning part-time in such a retail outlet, as well as he discovering regarding his shop's learning tools. During checkout, his shop requires the code scanner to scan objects.  

The barcode scanner uses laser beam technologies because the laser beam is rapidly running over the QR code or barcode back-and-forth, or executing the sequence. The sensors well into the system display the mirrored beam patterns that decrypts the barcode.

So, the following are the reason that describes the answer is correct according to the scenario.

5 0
3 years ago
A classmate says, "If you know a person's weight on each planet, you would be able to
fomenos
Nooooooooooooooonoooooooooo
8 0
3 years ago
The Transmission Control Protocol(TCP)/Internet Protocol (IP) was developed to allow computers to talk using a standard language
dusya [7]
And what is the rest of the question?
6 0
3 years ago
Create a Python program that asks the user in which direction to go? north, South East, or West?
QveST [7]

Answer:

huh

Explanation:

adsfghjkhgfdghjfghjkl

7 0
3 years ago
Other questions:
  • In object-oriented development, why is it necessary to use drivers and stubs in testing?
    9·1 answer
  • Hashing algorithms are used on evidence files to uphold the chain of custody in an investigation. Which of the following is NOT
    5·1 answer
  • Jesse earned $420 a week, and he worked 5 days a week. what is his daily wage?
    10·2 answers
  • Which function of InfoSec management encompasses security personnel as well as aspects of the SETA program?
    5·1 answer
  • What is meant by polling mode in communication between software andUART and what is its disadvantage as compared to interrupt mo
    14·1 answer
  • Someone who wants to learn a skilled trade on the job should consider
    6·2 answers
  • You would like to emphasize certain key terms on a slide with a bold format. Which slide element should you modify to provide th
    15·2 answers
  • Which king, after finding the decree of Cyrus giving the Jews permission to return and build the Temple, ordered the end of oppo
    11·2 answers
  • When should students practice netiquette in an online course? Check all that apply.
    9·1 answer
  • Describe the big data life cycle. Which step do you think is most useful and why?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!