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
How should a cover letter begin?
Alenkinab [10]
To professionally adress an introduction in a cover letter D. would be the correct answer.
4 0
3 years ago
Read 2 more answers
The act of using computer equipment to “break into” the computer systems of others?
zlopas [31]

Answer:

Hacking.

Explanation:

Breaking into other systems sounds like hacking.

3 0
2 years ago
Pls help is very urgent and I will mark u as brainliest plsssss​
elena-s [515]

Answer:

this is the method of processing wood

5 0
3 years ago
Read 2 more answers
Many large IT departments use a(n) _____ team that reviews and tests all applications and systems changes to verify specificatio
mafiozo [28]

Answer:

Quality assurance team

Explanation:

Software development life cycle (SDLC) is a process or stages of processes a software application must go through to be materialized. The stages of SDLC are planning, design, implementation or development, testing or verification, deployment and maintenance.

An implemented software design must be tested. It is tested based on the pre-dertermined design and the quality standard of the company. A group of test expect are approached for this purpose, they are called the quality assurance team

They are equipped with skills to use third party applications to analyze and verify the quality of the developed software.

6 0
3 years ago
Name the character encoding standard that enables up to 128 different commonly used characters,
Lelechka [254]

Answer:

ASCII character set.

Explanation:

ASCII is an acronym for American Standard Code for Information Interchange and it was developed from a telegraph code. It is typically a character encoding standard that comprises of seven-bit (7-bit) set of codes.

ASCII character set is the character encoding standard that enables up to 128 different commonly used characters, numbers and symbols to be used in electronic communication systems. The ASCII character set is only used for encoding English language and it comprises of both the lower case and upper case letters of the 26 alphabets, number 0 to 9 and symbols.

8 0
3 years ago
Other questions:
  • Is a protocol that allows users to log on to and access a remote computer?
    8·1 answer
  • In your presentation you added a text box to?
    5·1 answer
  • Janet manages the security of the database servers at the mortgage company where she works. The servers are Windows Server 2016;
    15·1 answer
  • Which of the following function headings arevalid? If they are invalid, explain why.
    12·1 answer
  • A collection of computers and other hardware devices that are connected together to share hardware, software, and data, as well
    15·1 answer
  • Which of the following is the answer?
    5·1 answer
  • Enthusiasm codehs 7.6.4 Write a function called add_enthusiasm that takes a string and returns that string in all uppercase with
    15·1 answer
  • When you listen to a guitar duet and have trouble hearing the melody, which of the following would best explain the problem?
    14·2 answers
  • How to test someone elese internet speed from a distance
    15·1 answer
  • A program similar to mtr, ____, is available as a command-line utility in Windows operating systems.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!