Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the correct answer could be more than one choice . How can you assign the value toaster to a c-string name str of size 10?

image text in transcribed

the correct answer could be more than one choice .

How can you assign the value "toaster" to a c-string name str of size 10? Str = "toaster"; str = toaster; strcpy(str, "toaster"); str.strcpy("toaster"); In which case would you consider using a dynamic array? If the array is small, and the size is known before the program runs. If the program needs to get the size of the array from the user If the array size is big, but known at compile time You should always use a dynamic array Which of the following defines the C-string containing "Done"? char str[4]= "Done"; char str = {'D', 'o', 'n', 'e', '\0'}; char str = "Done"; char str [55] = "Done" char str = {'D', 'o', 'n', 'e'}; Assume that you have the following statements: char str[50]="l will do great!'; cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

1.who the father of Ayurveda? 2. Who the father of taxonomy?

Answered: 1 week ago

Question

Commen Name with scientific name Tiger - Wolf- Lion- Cat- Dog-

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago