Question: Question 7: C-string Formatting (4 pts) Given: char message [100] char str1[] = cprE; char str2[] = iRobot int num-100; char ch1 = 50; char

 Question 7: C-string Formatting (4 pts) Given: char message [100] char

Question 7: C-string Formatting (4 pts) Given: char message [100] char str1[] = "cprE"; char str2[] = "iRobot" int num-100; char ch1 = 50; char ch2 56; Predict the C-string contained in message after each sprint. (2 pts each) Note 1: Treat each part independently. Note 2: You may need to look up on your own more details on printf and sprintf. a) sprintf (message, "cprESctctc is %s\", ch1, ch2, ch2, "fun"); b) sprintf (message, "Move the %s forward for %d cm", str2+1, num/2)

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!