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
Here is over 40pts as Promised? :)<br> Who invented the Lamborghini?
nordsb [41]

Ferruccio Lamborghini

He is the creator/inventor of the Lamborghini.

3 0
4 years ago
Read 2 more answers
Choose the best answer to complete the sentence.
zhuklara [117]

Answer:

the first one is A

the second question is B,C,F

Explanation:edg2020

5 0
4 years ago
A computer which links several pcs together in a network is called
Nadusha1986 [10]
Is it called a, "server".
8 0
4 years ago
Create a query that shows columns employee last name, job title and hire date for those employees who joined the company on or a
yawa3891 [41]

Answer:

SELECT last_name, job_title, hire_date FROM employee WHERE hire_date>="01-12-2016" AND job_title != "STOCK CLERK" ORDER BY job_title DESC;

Explanation:

The SQL code queries the employee table returning records of the last_name, job_title, and hire_date columns matching the employees hired on or after December 2016 and job titles that are not stock clerks in the employee table.

The WHERE and AND clause is responsible for the condition while the ORDER BY clause returns the query result in the of the job title in descending order.

3 0
3 years ago
What is the purpose of the Revisions pane in a presentation?
lana [24]
First option


Sorry if I’m wrong
7 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, a
    13·2 answers
  • Write a recursive, int -valued function, len, that accepts a string and returns the number of characters in the string .
    7·1 answer
  • What does the Sort feature do with a database
    13·1 answer
  • Mobile ethnography can be especially useful for documenting public behavior, such as waking up in the morning or administrating
    9·1 answer
  • "Career Clusters" describe a group of ________ within the same industry
    14·1 answer
  • _____ was just a sophomore when he began building computers in his dorm room at the University of Texas. His firm would one day
    14·1 answer
  • Consider a disk with the following characteristics (these are not parameters of any particular disk unit): block size B 512 byte
    8·1 answer
  • A network administrator determines who may access network resources by assigning users
    10·1 answer
  • Match the image to the view type in a presentation program. scroll bar tool bar status bar menu bar provides an array of buttons
    10·2 answers
  • Give the value of the zero flag, the carry flag, the signflag, and the overflow flag after each of the following instructions if
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!