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](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2eb0f673dc_91966f2eb0f0bcd2.jpg)
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
Get step-by-step solutions from verified subject matter experts
