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
choli [55]
3 years ago
9

Write statementsto show how finding the length of a character array char [ ] differs from finding the length of a String object

str.
Computers and Technology
1 answer:
NARA [144]3 years ago
4 0

Answer:

Length of char array: sizeof(arr)

Length of a string object: myString.length()

Explanation:

The sizeof approach is generally not recommended, since this information is lost as soon as you pass the array to a function, because then it becomes a pointer to the first element.

You might be interested in
WILL DO A BRIANLY! Use an algorithm to help the Python Turtle get to the finish line in 10 steps by using only the 3 commands be
Alexandra [31]

Answer:

3 3 2 1 1

Explanation:

8 0
3 years ago
The Fibonacci sequence begins with 0 and then 1 follows. All subsequent values are the sumof the previous two, for example: 0, 1
PSYCHO15rus [73]
0437818437848484919464689
4 0
3 years ago
In this question, we give two implementations for the function: def intersection_list(lst1, lst2) This function is given two lis
castortr0y [4]

Answer:

see explaination

Explanation:

a)Worst Case-time complexity=O(n)

def intersection_list(lst1, lst2):

lst3 = [value for value in lst1 if value in lst2]

return lst3

lst1 = []

lst2 = []

n1 = int(input("Enter number of elements for list1 : "))

for i in range(0, n1):

ele = int(input())

lst1.append(ele) # adding the element

n2 = int(input("Enter number of elements for list2 : "))

for i in range(0, n2):

ele = int(input())

lst2.append(ele) # adding the element

print(intersection_list(lst1, lst2))

b)Average case-time complexity=O(min(len(lst1), len(lst2))

def intersection_list(lst1, lst2):

return list(set(lst1) & set(lst2))

lst1 = []

lst2 = []

n1 = int(input("Enter number of elements for list1 : "))

for i in range(0, n1):

ele = int(input())

lst1.append(ele)

n2 = int(input("Enter number of elements for list2 : "))

for i in range(0, n2):

ele = int(input())

lst2.append(ele)

print(intersection_list(lst1, lst2))

6 0
3 years ago
According to programming best practices, how should you handle code that needs to be repeated several times in a program?
ahrayia [7]

Explanation:

Copy the code as many times as needed so that each usage is separate.

8 0
3 years ago
One last question
BlackZzzverrR [31]

Answer:

I love Chipotle!

Explanation:

I don't know, maybe because the food there is really good.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Find the Mechanical Advantage and the maximum separation load for a wedge (length = 6 inches and height = 3 inches) used to spli
    12·1 answer
  • (Game Design) A float is a blank space, used as a placeholder in an array<br><br> True or false
    13·1 answer
  • If you want to open an application that does not have a tile pinned to the Start menu, _____ to find it in the list of installed
    7·1 answer
  • What is the color difference between the iMac and iMac Pro
    14·2 answers
  • What should be used to clean LCD monitors? Liquid window cleaner Ammonia wipes Windshield washer liquid Antistatic monitor wipes
    15·1 answer
  • How does the binary numbering system differ from the hexadecimal numbering system?
    14·2 answers
  • Which term refers to the blank areas surrounding a document page? *
    15·1 answer
  • A device that make it possible for a muitiple customer to share one address is called
    13·1 answer
  • Pls help will give brainlest​
    15·2 answers
  • ________ are the symbolic codes used in assembly language?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!