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
kondaur [170]
3 years ago
11

Given an array of integers and the size of the array, write a function findDuplicate which prints the duplicate element from the

array. The array consists of all distinct integers except one which is repeated. Find and print the repeated number. If no duplicate is found, the function should print -1.
Computers and Technology
1 answer:
Jlenok [28]3 years ago
5 0

Answer:

#include <iostream>

using namespace std;

void findDuplicate(int arr[], int size) {

  for(int i = 0; i < size; ++i) {

      for(int j = i+1; j < size; ++j) {

          if(arr[j] == arr[i]) {

              cout << arr[j] << endl;

              return;

          }

      }

  }

  cout << -1 << endl;

}

int main() {

  int arr[] = {2, 3, 5, 6, 11, 20, 4, 8, 4, 9};

  findDuplicate(arr, 20);

  return 0;

}

Explanation:

You might be interested in
What is the meaning of HML​
trapecia [35]

Answer:

Explanation:

Hit my line

4 0
3 years ago
Read 2 more answers
Grenstall Inc., a software development firm, has adopted a new job evaluation system in which managers are asked to objectively
rosijanka [135]

Answer:

Grenstall is most likely using the point system

Explanation:

The point system is a method of job evaluation system that involves measuring performance of workers in an organization and allocating points to identifiable factors such as skills, efforts, training, knowledge and experience based on its performance. It does not focus on entire job functions. The allocated points enables the organization to determine the compensation that is commensurate for a particular position.

Greenstall Inc uses the point system technique of job evaluation system for its managers as their jobs were broken down based on their skills, mental and physical efforts, training, and responsibility with points being allocated to each of these factors which are then summed up.  

7 0
4 years ago
Al these are benefits of computer literacy except
Harrizon [31]

Explanation:

  • Being computer literate supports entrepreneurship. ...
  • Communication. ...
  • Enhance your employment opportunities. ...
  • Address the gap in your knowledge. ...
  • Computers Reconstruct Business
8 0
3 years ago
Dr. Wisteria is a prominent chiropractor in the Chicago area. She wants to provide a forum for her patients to discuss their hea
Svet_ta [14]

The best-suited telecommunications tool for Dr. Wisteria is a blog.

a blog

<u>Explanation:</u>

A blog can be defined as an informational website and more a platform for exchanging views and ideas about a particular topic.

There are various blogging platforms available. Dr. Wisteria should start writing blogs about health issues and in this way, she would be able to interact with all the people accessing the blog. People can also post their queries about their health issues and Dr. Wisteria can always reply to them.

This would also create a lot of awareness about any particular health issue being discussed as it is not necessary that only those people who want to post something will access the blog post, it can always be accessed by anyone.

5 0
3 years ago
Read 2 more answers
Which is a software configuration management concept that helps us to control change without seriously impeding justifiable chan
Darina [25.2K]

Answer:

Baselines

Explanation:

The idea of software configuration management is that of monitoring and controlling changes in the software. The baseline is the standard and formally accepted form of a software item that is meant to be configured. It is like a generally accepted reference point, which could be applied in effecting incremental changes in the software.

There are three types of baselines which are the functional, developmental, and product baselines. Functional baselines provide an overview of the functionality and specifications of a system. The product baseline encompasses both the functional and physical details of the system.

7 0
4 years ago
Other questions:
  • 4. What is a pentaprism? What job does it do in the camera?
    9·2 answers
  • Which of the following is an external hard drive
    11·1 answer
  • Sofia is reading a difficult text for class and worries that she won't complete it by the given deadline. How can a text-
    13·2 answers
  • How do you ask brainy a question without it not liking the question and saying it hurts their feelings?
    14·1 answer
  • Write a function called factor that determines for a pair of integers whether the second integer is a factor of the first. The f
    11·1 answer
  • ____________ are collected from several entities at the same point in time.
    13·1 answer
  • How do medical detectives investigate their cases?
    15·2 answers
  • What is human data,
    8·1 answer
  • What is the advantage of maintaining a list of keywords while creating a design blueprint?
    13·2 answers
  • I NEED HELP SOMEONE HELP ME PLEASE
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!