Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

True/False: Circle one 1. True/False Variable and functions identifiers can only begin with alphabet and digit. 2. True/Fale Array sizes can be non-constant variables. 3.

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
True/False: Circle one 1. True/False Variable and functions identifiers can only begin with alphabet and digit. 2. True/Fale Array sizes can be non-constant variables. 3. True/Fa Array sizes must be known at compile time. 4. True /False An array can have size of 0 S. True / False int m # 156; won't compile because the types do not match. 6. True /False int n 11/S; will allocate memory for n and initialize with the value 2. 7. True/False Array indices begin with the number 1 8. True/False You can define multiple functions with the same identifier 9. True/Fal Variables declared local to a function are still accessible after the function completes execution. 10. True/False structs by default have private access specification. 11. Suppose you're tasked with fixing a function definition that does not work as intended. The function is supposed to compare two strings and set the count to the number of identical characters, two characters are identical if they are the same character and are in the same position in the cstring. This function will be case sensitive so the character a is not the same as 'A. Note that cstrings are just character arrays that have 10 as their last character, for example char name[7]hary" might looks like this in memory: Usage of this function might look like: int count8 compareCstrings( tacocat",TACOCAT", count) / should set count to 8 compareCstrings( Harry""Malfoy", count); comparecstrings( SMC", "SBCC, count); // should set count to1 // should set count to 2 Currently the function definition is: void compareCstrings (const char stri[], const char str2[], int count) &count int index; while (stri!e 1l str2 ( if (stristr) &count++; index+; Identify the errors in the above implementation and rewrite the function so that it satisfies specification. Try to keep the general form of the original code, you should not have to add or remove any lines of code, just modify the existing ones Page 1 of6

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

Define and measure service productivity.

Answered: 1 week ago