Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
The Modern C++ Challenge

You're reading from   The Modern C++ Challenge Become an expert programmer by solving real-world problems

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781788993869
Length 328 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (20) Chapters Close

Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
1. Math Problems FREE CHAPTER 2. Language Features 3. Strings and Regular Expressions 4. Streams and Filesystems 5. Date and Time 6. Algorithms and Data Structures 7. Concurrency 8. Design Patterns 9. Data Serialization 10. Archives, Images, and Databases 11. Cryptography 12. Networking and Services 1. Bibliography 2. Other Books You May Enjoy Index

Problems


95. Finding the IP address of a host

Write a program that can retrieve and print the IPv4 address of a host. If multiple addresses are found, then all of them should be printed. The program should work on all platforms.

96. Client-server Fizz-Buzz

Write a client-server application that can be used for playing the Fizz-Buzz game. The client sends numbers to the server that answer back with fizz, buzz, fizz-buzz, or the number itself, according to the game rules. Communication between the client and the server must be done over TCP. The server should run indefinitely. The client should run as long as the user enters numbers between 1 and 99.

Fizz-Buzz is a game for children, intended to teach them arithmetic division. A player must say a number and another player should answer with:

  • Fizz, if the number is divisible by 3
  • Buzz, if the number is divisible by 5
  • Fizz-buzz, if the number is divisible by both 3 and 5
  • The number itself in all other cases

97. Bitcoin exchange rates

Write a program that...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images