Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C Program question (a) Study the following program and the first three lines of the output. Work out the remaining lines of output using the

C Program question

image text in transcribed

(a) Study the following program and the first three lines of the output. Work out the remaining lines of output using the information of the first 3 lines. Note that executing the program on your computer may help, but some of the actual values may differ. include #include struct storeRoom int roomNum; char roomTitle [256] int size char type: int main ) struct storeRoom roomArray[2561: struct storeRoom another: anotherroomArray[2] printf ("%d ", printf ("%d ", printf("%d ", sizeof (struct storeRoom) ) ; roomArray) ; &roonArray[1]); printf ("%d ", sizeof (roonAr ray) ) ; printf ("din", sizeof (another)) printf("%d ", &(roonArray[4])); rintf("%d ", another + 2);} 268 76571 6765980 (b) The normal way to format a text message is to have exactly one space betweern two consecutive words. Sometimes people add additional spaces either accidently or on purpose.* Complete the following function that looks for consecutive spaces in a string, and finds out the length of the longest such consecutive spaces. int findLongestSpace (char line ) The parameter line contains a line of text. The function should also return the result. Implement this function. The function should not print anything to the screen.+ Add code to check if the input parameter word is not NULL. Return -1 if it is so.*

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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

Is Finagle A Bagel a tall or flat organization? How do you know?

Answered: 1 week ago