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
1. _____ are used to clarify code, but are not interpreted by the interpreter as commands. (1 point)
mariarad [96]

Answer:

1. D Comments

2. B False

3. C Logical Expression

8 0
4 years ago
Read 2 more answers
Ano ang word processor at electronic spreadsheet​
AveGali [126]

Answer:

excel

Explanation:

3 0
3 years ago
Read 2 more answers
NEED HELP ASAP!
Marrrta [24]
Six inches is the answer
8 0
3 years ago
An excel worksheet can have a maximum of ____ columns in a worksheet.
Marina CMI [18]

It can have only 16,384 number of columns

6 0
3 years ago
You manage 20 windows workstations in your domain network you want to prevent the sales team members from making system changes
Rainbow [258]

Answer:

You should configure the user account control.

Explanation:

Behavior of the elevation prompt for standard users setting in Group Policy to Prompt for credentials.

4 0
3 years ago
Other questions:
  • There are several vehicles in a parking lot. Some of them are motorcycles
    8·2 answers
  • Can someone tell me? I have an assignment in C++: I have to do three codes please tell me should i do them in one project or in
    12·1 answer
  • Coordinate with
    12·1 answer
  • Give ways on how to effectively save.​
    15·1 answer
  • HELP PLEASE!!!! Which development method is best explained in this way: developing a system through repeated cycles and smaller
    10·1 answer
  • Bonjour ma question est: expliquer comment fonctionne une calculatrice qui ne contient pas une pile. Pouvez-vous m'aider?
    12·1 answer
  • In numpy to append two arreys vertically the function __ is used
    12·2 answers
  • What is the importance of knowing the concept of programming?
    8·1 answer
  • Tom is not sure how to code contents such as title and meta elements. These are coded as ____ elements.
    8·2 answers
  • If you want to join all of the rows in the first table of a SELECT statement with just the matched rows in a second table, you u
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!