Thursday 26 October 2023

Chapter 27 // Exercise 8 - Principles & Practice Using C++

In this exercise I'm using Visual Studio 2022.

Chapter 27 // Exercise 8

What is the lexicographical order on your machine? Write out every character on your keyboard together with its integer value; then, write the characters out in the order determined by their integer value.

Ah finally, a nice "easy" one. Although I kind of cheated. I basically just looped through the ascii table from 0 to 255 and printed everything. I think maybe he wanted us to actually write a string and fill it with the actual characters on our keyboard but I have no idea how to get special characters out of my keyboard so I just left it to the for loop.

No comments:

Post a Comment