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
Tom [10]
3 years ago
13

Write the proghrams for the following:

Computers and Technology
1 answer:
belka [17]3 years ago
5 0

Answer:

a)

#include <iostream>

using namespace std;

int main() {

   bool a,b,c;

   cin>>a>>b;

   if(a^b)//X-OR operator in C++.

   c=true;

   else

   c=false;

   cout<<c;

return 0;

}

b)

#include <iostream>

using namespace std;

int main() {

   bool a,b,c,d;

   cin>>a>>b>>c;

   if((a^b)^c)//X-OR operator in C++.

   d=true;

   else

   d=false;

   cout<<d;

return 0;

}

Explanation:

The above written programs are in C++.There is an operator (^) called X-OR operator in C++.It returns true if the number of 1's are odd and returns false if the number of 1's are even.

In the if statement I have user X-OR operator(^) to find the result and storing the result in another boolean variable in both the questions.

You might be interested in
What is block chain?
LuckyWell [14K]

Answer:

Block Chain is a system of recording information that makes it difficult or impossible to change, hack, or cheat the system.

A blockchain is essentially a digital ledger of transactions that is duplicated and distributed across the entire network of computer systems on the blockchain.

Hope this helps.

x

6 0
2 years ago
Read 2 more answers
The challenge of preparing for ____________________ is in ensuring that employees do not feel that they are being prepared for t
Liula [17]

Answer:

"Cross-training " seems to be the right response.

Explanation:

  • Cross-training seems to be the method of constructing a multi-professional workers staff with incentive plans to make sure that they must have the same tools to complete different occupational tasks throughout the organization.
  • This will be a very broad approach besides randomized controlled training methods, both maximum and minimum frequency, for generations.
7 0
3 years ago
If no other row matches, the router will select the ________ row as its best match. First Last either First or Last, depending o
zzz [600]

Answer:

Last

Explanation:

Routing is a term in engineering which involves the process of selecting a path for traffic in a network or across multiple networks. It is applicable in circuit-switched networks, such as the public switched telephone network (PSTN), and computer networks, such as the Internet. It is mostly used as a term for IP Routing.

Hence, in IP Routing, the first step is comparing the packet's destination IP address to all rows, followed by selecting the nest-match row. However, If no other row matches, the router will select the LAST row as its best match.

6 0
3 years ago
A support technician uses the ping utility on a system that is online, yet no response is received. What should be allowed throu
alexgriva [62]

Answer:

Internet Control Message Protocol (ICMP) Echo Requests

Explanation:

A system that has Windows Firewall or antivirus or other third party antivirus enabled with their configuration setting set to default, ping command from another device will not be able to see if the device with an enabled firewall is alive.

The ping command sends Internet Control Message Protocol (ICMP) Echo Request to a destination device after the destination device will reply with a Reply packet. However, by default, firewalls, such as Windows firewall blocks ICMP Echo Requests from the external network and pinging will  work when the firewall is disabled or an exception is created that lets ICMP Echo Requests pass through the firewall.

4 0
3 years ago
The number 84 is divisible by 2,3,4 and 6. true or false
Eva8 [605]
84÷2=42. 84÷3=28. 84÷4=21. 84÷6=14. So your answer is true.
8 0
3 years ago
Read 2 more answers
Other questions:
  • 1. Perform the following Binary Additions 101101 + 10100 *
    13·2 answers
  • Which of the following is true about images that are arranged in a collumn
    9·1 answer
  • a corporation needs an operating system that allows the various teams in its office to network &amp; collaborate on projects. wh
    11·2 answers
  • Which act requires financial institutions to ensure the security and confidentiality of customer data and mandates that data mus
    8·1 answer
  • Complete the second clause of the following Prolog program for member/2 where member(X, Y) checks whether X is an element (a mem
    7·1 answer
  • Before performing a Web Recorder task, which two options should the user ensure are setup correctly?
    6·2 answers
  • a machine needs a minimum of 100 sec to sort 1000 names by quicksort what is the approximate worst case time needed to sort 100
    13·1 answer
  • You have imported a library with the birthMonth() function. Based on the API, how many strings are inputed to calculate the birt
    11·1 answer
  • Find out about the different technological solutions available for interconnecting LANs to from larger networks such as wide are
    5·1 answer
  • You are creating a web page as part of a science project. Your role is to put your data on the webpage. You tracked the growth o
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!