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
Natali [406]
3 years ago
15

Assign True to the variable has_dups if the string s1 has any duplicate character (that is if any character appears more than on

ce) and False otherwise.
Computers and Technology
1 answer:
podryga [215]3 years ago
4 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   string s;

   cin>>s;    //reading string

   int i,j;

   bool has_dups=false;

   int n= s.length();

   for(i=0;i<n;i++)  //to check for duplicate characters

   {

       for(j=0;j<n;j++)

       {

           if(j!=i && s[i]==s[j])  //to check if it is matched with itself

           {

               has_dups=true;  //if true no need to check others

               break;

           }

       }

   }

   cout<<has_dups;

   return 0;

}

OUTPUT :

California

1

Explanation:

Above program finds if a character repeat itself in the string entered by user.

You might be interested in
When the writer of a letter sends a copy to a third party without the knowledge of the person receiving the original letter, it
ahrayia [7]

The answer here is Blind carbon copy (bcc).

The original recipients of the letter are unable to see (blind) who else receives a copy if those parties are on the bcc list.

3 0
3 years ago
The _______ move the fabric forward in the machine. A. pressure plates B. zipper feet C. hem guides D. feed dogs
Lyrx [107]
The equipment that move the fabric forward are called "Hem guides"
8 0
4 years ago
Boosting morale in a workplace through reorientation is accomplished by giving employees _____. a. snacks and drinks b. the same
bixtya [17]
Snacks and Drinks (A)
4 0
3 years ago
Read 2 more answers
What is the fundamental goal of outsourcing? increased quality brand expansion cultural diversity cost savings
galben [10]

Answer:

Cost saving is the fundamental goal of outsourcing.

Explanation:

Initially the companies where outsourcing task only for Cost cutting. But nowadays, the companies do that for so many other reasons like, increase the efficiency, reducing overhead, to concentrate on core business peacefully, to obtain more profit, etc.  

The cultural diversity does not affect or make companies to outsource.

We can indirectly increase the quality but it is not the primary goal of outsourcing.  

Brand expansion will holds good, only the BPO is run under the name of the company. But this is once again not the major objective.

7 0
3 years ago
The most prominent type of system software, the ________, coordinates the interaction between hardware components, peripherals,
GREYUIT [131]

Answer: (B) Operating system

Explanation:

 The operating system is one of the most important type of the system software as it helps in run the various types of computer system and also provide the interaction between the various hardware components, software application and the users.

It technically provide the essential components to manage the information system infrastructure in an organization.

The operating system basically providing the user interface so that it enable the user for easily interaction with the different computer systems. Now-a-days, the GUI (Graphical user interface) is basically used by the operating system for interaction with the users.  

 

6 0
3 years ago
Other questions:
  • Which of the following STEM discoverers is known as the “Prince of Math?”
    13·1 answer
  • A security system uses sensors at every door and window which will set off an alarm if any one of them is opened. There is also
    9·1 answer
  • Which of these can a worksheet within a spreadsheet contain?
    7·2 answers
  • 4. How can you select non-adjacent cells (i.e. cells that are not all together in one block)?
    5·2 answers
  • nswer the following questions concerning chapter 1:1.1 Which pair of layers are NOT peer layers?a.Transport layer in the sender
    9·1 answer
  • Counter-controlled repetition is also known as:
    8·1 answer
  • Express the following binary numbers in hexadecimal. (a) %100011100101 (b) %1011001111 (show work)
    9·1 answer
  • Declare a variable temperature and initialize it to 98.6. Instructor Notes: Note that "initialize" means "declare and assign a v
    5·1 answer
  • What is the relationship between agile teams and project requirements
    9·1 answer
  • Summary about Interface Design in system analysis
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!