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
Whitepunk [10]
3 years ago
15

The following program declares an array of char named as myString There are 6 following cases (a, b, c, d, e, f) to access myStr

ing. Which cases are valid access? If there are any invalid cases, how to correct them? #include using namespace std; int main() { char myString[16]; //a. strcpy_s(myString, "Hello the world"); //b. cout << strlen(myString); //c. myString = "Mary Lane"; //d. cin.getline(myString, 80); //e. cout << myString; //f. myString[6] = 't'; return 0;
Computers and Technology
1 answer:
yuradex [85]3 years ago
3 0

Answer:

See explaination

Explanation:

a.

myString is "Hello the world"

b.

prints "15"

c.

This is invalid.

We have to use strcpy_s to copy strings

FIX:

strcpy_s(s,"Marylane");

d.

reading string upto length 80 from the user and stored it in myString variable

e.

prints the string enetered by user to console

f.

replacing 7th character by 't'

You might be interested in
Sedimentary rock formation occurs when igneous, metamorphic, or other sedimentary rocks are exposed to the unyielding forces of
Natalija [7]
Deposition is the answer
3 0
3 years ago
Read 2 more answers
What color line appears under a word that is spelled incorrectly in power point
strojnjashka [21]

Answer:a wavy red line

Explanation:

Hope this helps

Can I have brainliest pls

7 0
3 years ago
Read 2 more answers
You manage a server that users store their document files on. you are finding that some users are utilizing more space than they
STALIN [3.7K]
You can set soft or hard quotas on file shares per user or per group. This would limit how much space a user can take up.
5 0
3 years ago
Two different applications that make use of the barcode
jeyben [28]
Library books and items bought in stores are 2 different applications that make use of barcodes.
8 0
3 years ago
Please Complete in Java a. Create a class named Book that has 5 fields variables: a stock number, author, title, price, and numb
Gala2k [10]

Answer:

Explanation:

The following code is written in Java. I created both versions of the program that was described in the question. The outputs can be seen in the attached images below. Both versions are attached as txt files below as well.

Download txt
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> txt </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> txt </span>
13e8818abb53c8bc7547a966a10a101d.jpg
8623bf9304771a3e1c8581a41a9c11f6.jpg
8 0
2 years ago
Other questions:
  • _______ allows you to specify how a photo is positioned in the text of your document.
    11·1 answer
  • What does the merge &amp; center button in the alignment group on the home tab do?
    8·1 answer
  • The signature of a function is determined by
    5·1 answer
  • Complete the body of the decrement static method using only the NaturalNumberKernel methods (multiplyBy10, divideBy10, and isZer
    10·1 answer
  • A device that make it possible for a muitiple customer to share one address is called
    13·1 answer
  • When you open a browser window, it open in a _____. <br> a. fieldb. folderc. menud. window?
    7·1 answer
  • Can anybody do Algorithm 2 for me (with Python).<br> Answer = 25 points.
    13·1 answer
  • In addition to good design sense, what else do web designers need to be proficient in?
    13·1 answer
  • What would be an ideal scenario for using edge computing solutions?
    6·1 answer
  • Which of the following is classified as a workgroup information system?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!