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
Flauer [41]
3 years ago
5

String member function compare compares two strings (or substrings) and returns 0 if:

Computers and Technology
1 answer:
Margarita [4]3 years ago
6 0

Answer:

The correct answer for the given question is option(B). i.e the strings are equal.

Explanation:

String are the collection of characters.In the string compare function if both string are equal then it return 0 value otherwise it return non zero value.

if string 1 is greater then the string 2 then it return 1 . in c language

if string 2 is greater then string 1 then it return -1 in c language.

You might be interested in
WHAT IS A GOOD APP FOR REMOVING VIRUSES AND IT YOU DONT HAVE TO PAY MUCH FOR IT ????? PLEASE HELP ME
pishuonlain [190]

Answer:

Best free virus removal and free malware removal tools

Avira Free Antivirus – Offers a larger package of free security tools than most competitors, including real-time AV, malware removal, and a VPN. Bitdefender Antivirus Free Edition: Award-winning free version

8 0
3 years ago
Read 2 more answers
What are the two main factors in the mantle that contribute to the rock cycle?
meriva
Pressure and heat I believe is the answer not sure
8 0
3 years ago
Read 2 more answers
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (a
oksano4ka [1.4K]

Answer:

The program to this question can be defined as follows:

Program:

import java.util.*; //import package

public class Main //defining class

{

   public static void main(String[] as) //defining main method

   {

       Scanner ax= new Scanner(System.in);//create Scanner class object for user-input

       String val; //defining String variable

       int x;//defining an integer variable

       System.out.print("Enter string value first then numeric, and for exit 'quit & 0': \n");

       val = ax.next(); //input value

       x = ax.nextInt();//input value

       while(!(val.equals("quit") && x==0)) //Check value

       {

           System.out.println("Eating "+x+" "+val+" a day keeps the doctor away."); //print value

           val = ax.next(); //input value

           x= ax.nextInt(); //input value

       }

   }

}

Output:

Enter string value first then numeric, and for exit 'quit & 0':  

apple 5

Eating 5 apple a day keeps the doctor away.

shoes 2

Eating 2 shoes a day keeps the doctor away.

quit 0

Explanation:

In the above program, two variable "val" and "x" is declared, in which "val" is string variable and "x" is integer variable, in the next line, a while loop is declared, which can be described as follows:

In the loop, a condition is checked, that "val" is equal to "quit" and x is equal to "0", inside the loop, it will input value from the user-end.  

8 0
4 years ago
Read 2 more answers
Give 2 examples of when spreadsheets are used.
Anni [7]

Answer:

exam result mostly in colleges and high schools

3 0
3 years ago
What is machine level language ?​
NeX [460]

Answer:

The machine-level language is a language that consists of a set of instructions that are in the binary form 0 or 1.

5 0
3 years ago
Other questions:
  • Many computer users and some operating systems call subdirectories ____.
    10·1 answer
  • What is the default file extension for a document created in Word 2016​
    13·1 answer
  • Insert the missing code in the following code fragment. This fragment is intended to read an input file named dataIn.txt and wri
    13·1 answer
  • A typical item in a plan of procedure includes the name of the part of the ______ to
    5·1 answer
  • Suppose that a database modification results in the execution of a trigger but that trigger generates another modification that
    9·1 answer
  • Choose the correct statements about computer-programming languages. Choose all that apply.
    8·2 answers
  • Henry is planning to visit Spain for a vacation. He wants to learn Spanish, but he prefers to do it in a fun way. He searches on
    8·2 answers
  • Sonja is writing a program to compare two numbers and print the larger number. Which of these should be used?
    6·1 answer
  • A___ is a placeholder where you can enter text to manipulate and give new graphical effects.​
    13·1 answer
  • What is the point of comments in code? Discuss at least two possible uses of code, including specific examples of what a comment
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!