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
You work part-time at a computer repair store. You're building a new computer. The customer has requested two serial ATA (SATA)
Svetllana [295]

You should design and develop the computer system with two serial ATA (SATA) hard drives installed on it.

<h3>What is a computer?</h3>

A computer can be defined as an electronic device that is designed and developed to receive data in its raw form as an input and it processes these data into an output (information), which can be used to perform a specific task through the use of the following computer parts:

  • Keyboard
  • Network
  • Monitor screen
  • Mouse
  • Hard drive

<h3>What is a hard drive?</h3>

A hard drive can be defined as an electro-mechanical, non-volatile data storage device that is made up of magnetic disks (platters) that rotates at high speed.

Based on the information provided, we can logically deduce that you're required to design and developed a computer with two serial ATA (SATA) hard drives.

In conclusion, you should follow the aforementioned steps to develop this computer with two serial ATA (SATA) hard drives installed on it.

Read more on hard drive here: brainly.com/question/26382243

#SPJ1

5 0
2 years ago
OMGGGGGGGGGGG chloeeeeeeeee plzzzzzzzzzz
tangare [24]

Answer:

huh y did u waste my 6 months ya gone pay for it

4 0
3 years ago
Read 2 more answers
____ is a linux-based operating system developed by the open handset alliance.
Misha Larkins [42]
The answer is Android
6 0
4 years ago
Write a python program to calculate the sum of numbers from 1 to 20 which is divisible by 3.
Ksivusya [100]

Answer:

Input : N = 5

Output : 7

sum = 3 + 4

Input : N = 12

Output : 42

sum = 3 + 4 + 6 + 8 + 9 + 12

4 0
3 years ago
Read 2 more answers
Which of the following methods causes the next slide to be displayed during a slide show? Select all the options that
photoshop1234 [79]
B (spacebar) and D (right mouse button)
3 0
3 years ago
Read 2 more answers
Other questions:
  • Inputs to a system that can enhance performance is called
    6·2 answers
  • When troubleshooting firewalls, which of the following is not something you should do after you attempt a fix?
    7·1 answer
  • You can access decorative underlines and change their color through the ____ drop-down.
    8·1 answer
  • Write a statement that declares a prototype for a function add, which has two int parameters and returns an int .
    13·1 answer
  • What important Apple computer (with a GUI OS) was introduced in 1984? Apple I?
    13·1 answer
  • You will need to complete the functions these functions: a. get_total This function takes in pennies, nickels, dimes, and quarte
    11·1 answer
  • Computers heat resistant materials breathing systems for fire fighters food-growing technologies improvements in all of the item
    14·1 answer
  • Business application software programs make it possible to
    10·1 answer
  • Write a static method named isSorted that takes an array of real numbers as a parameter and that returns true if the list is in
    5·1 answer
  • A web application's code prevents the output of any type of information when an error occurs during a request. The development t
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!