Does this code have a problem?

```
char strVar[] = “Hello”;
strcat(strVar, “ And Good-bye.”);
cout << strVar << endl;
```
What will be an ideal response?

The output is questionable. You might get Hello And Good-bye. But you
might not. It stomps memory a few characters away from your C-string. Your system
might crash the next time you load an application. The C-string variable, strVar
isn’t large enough to hold all we are attempting to stuff into it..

Computer Science & Information Technology

You might also like to view...

To see the order and method in which animations will appear in the Slide Show view, use the Play button in the Animation Pane

Indicate whether the statement is true or false

Computer Science & Information Technology

Which of the following peripheral devices can handle both input and output?

A. camera B. fax C. microphone D. mouse

Computer Science & Information Technology