Answered step by step
Verified Expert Solution
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?
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!'; coutStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started