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
The ampacity of a No. 12 aluminum wire with RHW insulation installed in a raceway that has 19 other wires is
GREYUIT [131]
<span>i believe the answer is C</span>
7 0
3 years ago
What are the design concepts and assumptions behind a class, an object and the relationship between them? What are the roles met
Triss [41]

Answer:

Object-oriented programming (OOP) is a procedural language and based on classes associated with an object. Without classes and object relationship OOP is not possible. According to program's design concept classes provide abstraction and encapsulation with the help of object. Object have states and behaviors like cat has states like name, color and  cat has also behaviors like  wagging the tail, eating, jumping etc. A class forms template or blueprints for these states and behaviors because different cats have different behaviors and states.

Methods provide a way for encapsulation and accessing private class members with public methods and static fields are sometimes best alternative for global variable. We can use static field when it same for all and shared by all objects of that class and it can save memory because we do not have to initialize it for each object

8 0
3 years ago
Write a function called reverse() with this prototype:
tresset_1 [31]

Answer:

void reverse(char dest[], char source[], int size)

{

   for(int i=0;i<size;i++)//using for loop.

   {

       dest[i]=source[i];//assigning each element of source array to dest array.

   }

   int s=0,e=size-1;//initializing two elements s with 0 and e with size -1.

   while(s<e){

       char t=des[s];             //SWAPPING

       dest[s]=dest[e];            //SWAPPING

       dest[e]=t;                  //SWAPPING

       s++;

       e--;

   }

}

Explanation:

I have used while loop to reverse the array.I have initialize two integer variables s and e with 0 and size-1.Looping until s becomes greater than e.

It will work as follows:

first s=0 and e=0.

dest[0] will be swapped with dest[size-1]

then s=1 and e=size-2.

then des[1] will be swapped with dest[size-2]

and it will keep on going till s is less than e.

4 0
3 years ago
________(fill in the blank) in online education refer(s) to how fairly the particular needs of particular groups of students are
STatiana [176]

Answer:

Accessability

Explanation:

6 0
3 years ago
A(n) _____ is used to create a new file or to overwrite an existing file by attaching it to a command that produces output.
Alex787 [66]

Answer: Redirection symbol

Explanation: Redirection symbol/operator is the special operator that is used in programs along with commands. The operators that are generally used are ">",">>","I" and "<". These commands are given in the section of the DOS commands and other command prompt sections. This is the process where the changes in input feed and output is  analyzed and read through these commands.

3 0
3 years ago
Other questions:
  • Machine language is made up of which following codes
    11·1 answer
  • The picture that graphically represents the items you use in windows is called a/an
    15·2 answers
  • Suppose you want to encode the numerals 0–9 and the 26 letters of the alphabet, using separate codes for lowercase and uppercase
    13·1 answer
  • 1. What is an advantage of the PCIe bus over the PCI bus?
    9·1 answer
  • You want to get information about DNS request types and DNS query packet content. What kind of DNS logging do you need to enable
    13·1 answer
  • Which kind of system software tells the computer how to communicate with peripherals, such as a prero
    6·2 answers
  • Which of the following comments are correct? Select all that apply.
    14·1 answer
  • When a derived class method has the same name as a base class method, it is often said that the derived class method ________ th
    13·1 answer
  • Consider the following recursive method. public static string recur(int val) { string dig = "" + (val % 3); if (val / 3 &gt; 0)
    10·1 answer
  • Discuss the information justify with two examples<br>​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!