(Acknowledgement: This exercise is u.ac.jp/user/susaki/c_eng/pointer_e.html) We want to show a string repeatedly by shifting the top character of the string to the right. Refer to a below execution example. Write a below source code, complement the expression hidden by "******" to meet this requirement. Confirm whether it can execute properly. posted at http://www.gi.ce.t.kyoto-

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please do in C

34.
4EFGH
35.
EFGH
36.
FGH
37.
GH
38.
H
39.
40.
%24
Transcribed Image Text:34. 4EFGH 35. EFGH 36. FGH 37. GH 38. H 39. 40. %24
exercise is posted at http://www.gi.ce.t.kyoto-
1. (Acknowledgement: This
u.ac.jp/user/susaki/c_eng/pointer_e.html) We want to show a string repeatedly by
shifting the top character of the string to the right. Refer to a below execution example.
Write a below source code, complement the expression hidden by "******" to meet this
requirement. Confirm whether it can execute properly.
2. #include <stdio.h>
3.
4. int main (void)
5. {
6.
char
str(20], *p;
7.
rintf("Input about 10 characters of string\n");
scanf ("%s" str);
8.
9.
10.
11.
// Pointer variable refers to address of string
12.
*********
13.
***
14.
15.
// Show string by shifting top character of string to
right
16.
17.
18.
19.
20.
21.
return (0) ;
22.
(Execution example)
$ ./a.out
Input about 10 characters of string
abcd1234EFGH
23.
24.
25.
26.
27.
abcd1234EFGH
28.
bcd1234EFGH
29.
cd1234EFGH
30.
d1234EFGH
31.
1234EFGH
32.
234EFGH
33.
34EFGH
Transcribed Image Text:exercise is posted at http://www.gi.ce.t.kyoto- 1. (Acknowledgement: This u.ac.jp/user/susaki/c_eng/pointer_e.html) We want to show a string repeatedly by shifting the top character of the string to the right. Refer to a below execution example. Write a below source code, complement the expression hidden by "******" to meet this requirement. Confirm whether it can execute properly. 2. #include <stdio.h> 3. 4. int main (void) 5. { 6. char str(20], *p; 7. rintf("Input about 10 characters of string\n"); scanf ("%s" str); 8. 9. 10. 11. // Pointer variable refers to address of string 12. ********* 13. *** 14. 15. // Show string by shifting top character of string to right 16. 17. 18. 19. 20. 21. return (0) ; 22. (Execution example) $ ./a.out Input about 10 characters of string abcd1234EFGH 23. 24. 25. 26. 27. abcd1234EFGH 28. bcd1234EFGH 29. cd1234EFGH 30. d1234EFGH 31. 1234EFGH 32. 234EFGH 33. 34EFGH
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY