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
irinina [24]
3 years ago
5

PROGRAM LANGUAGE C

Computers and Technology
1 answer:
meriva3 years ago
5 0

Answer:

I'm better at C++, but I'm pretty sure this it:

/*C - Program to compare two strings  

character by character.*/

#include<stdio.h>

int main(){

char str1[]="Hello";

char str2[]="Hello";

int len1=0, len2=0;

int i,isSame=0;

 

//calculate lengths

i=0;

while(str1[i++]!='\0') len1++;

i=0;

while(str2[i++]!='\0') len2++;  

 

if(len1!=len2){

 printf("Strings are not same, lengths are different\n");

 return -1;

}

 

isSame=1;  

for(i=0;i<len1;i++){

 if(str1[i]!=str2[i]){

  isSame=0;

  break;

 }

}

 

if(isSame)

 printf("Strings are same.\n");

else

 printf("Strings are not same.\n");

 

return 0;

}

You might be interested in
By using ____, you can use reasonable, easy-to-remember names for methods and concentrate on their purpose rather than on memori
Ivan

Answer:

Polymorphism

Explanation:

5 0
4 years ago
A minor with prior convictions of Minor in Possession (MIP) who is charged with a subsequent MIP may be penalized with a jail se
GarryVolchara [31]
The minor may be penalized with a jail sentence of up to thirty days for his second offence.  A jail sentence of up to sixty days is possible for third offence. Under MCL 436, a minor is someone who is under twenty one years old. Such minors may not purchase, consume or be in possession of any alcoholic liquor. Possession of alcoholic drinks can be actual or constructive. It is actual when you have direct physical control over it and it is constructive when you know where it is and you have reasonable access to it.
3 0
3 years ago
Read 2 more answers
A ____________would be a misconfiguration of a system that allows the hacker to gain unauthorized access, whereas a_____________
seraphim [82]

Answer:

The answer to this question is vulnerability and risk.

Explanation:

Vulnerability is there us misconfiguration in the system  and we know that our system is vulnerable means the hacker can gain unauthorized access to our system.

Risk is when there are chances that a misconfiguration  might happen in our system in future so that hacker could gain unauthorized access to the system.

7 0
3 years ago
Themes are applied from which tab?
Verdich [7]
Themes are selected in different tabs. It varies. 
3 0
3 years ago
How do you turn off amber alerts on iphone?
olga2289 [7]
Https://www.imore.com/sites/imore.com/files/styles/larger/public/field/image/2016/04/amber-alert-notification-settings-screens.jpeg?itok=rLaycAMr
4 0
3 years ago
Read 2 more answers
Other questions:
  • If I deal seven cards from a standard deck of 52, what is the chance that I will get two triples (three of a kind) and one other
    11·2 answers
  • Write a program named Admission for a college’s admissions office. The user enters a numeric high school grade point average (fo
    15·1 answer
  • Universal Containers is creating a custom Visualforce page to allow users to edit contact records. The developer has used an ape
    6·1 answer
  • When specifying keywords to conduct an internet search, which of the following parts of speech will be the most useful??
    6·1 answer
  • Keyword stuffing is considered to be a black hat technique for SEO and is highly suggested today by Google.
    6·1 answer
  • a) Write out an abstract class to represent a ball. Include data fields to store the weight of the ball as a double value and th
    6·2 answers
  • Write the Java code to simulate an inventory control system and a point of sale system with customer history On program start, e
    5·1 answer
  • Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. T
    6·1 answer
  • Is jesus dead or alive
    11·1 answer
  • A list cannot use appendleft but a _____ can.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!