Question: 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?

 the correct answer could be more than one choice . How

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!