Skip to Content
Programming Interviews Exposed: Secrets to Landing Your Next Job, 3rd Edition
book

Programming Interviews Exposed: Secrets to Landing Your Next Job, 3rd Edition

by John Mongan, Eric Giguere, Noah Kindler
November 2012
Beginner
336 pages
9h 48m
English
Wrox
Content preview from Programming Interviews Exposed: Secrets to Landing Your Next Job, 3rd Edition

Strings

Strings are sequences of characters. However, what constitutes a character depends greatly on the language used and the settings of the operating system on which the application runs. Gone are the days when you could assume each character in a string is represented by a single byte. Multibyte encodings (either fixed length or variable length) of Unicode are needed to accurately store text in today’s global economy.

More recently designed languages, such as Java and C#, have a multibyte fundamental character type, whereas a char in C and C++ is always a single byte. (Recent versions of C and C++ also define a character type wchar_t, which is usually multibyte.) Even with built-in multibyte character types, properly handling all cases of Unicode can be tricky: There are more than 100,000 code points (representation-independent character definitions) defined in Unicode, so they can’t all be represented with a single, 2-byte Java or C# char. This problem is typically solved using variable length encodings, which use sequences of more than one fundamental character type to represent some code points.

One such encoding is UTF-16, used to encode strings in Java and C#. UTF-16 represents most of the commonly used Unicode code points in a single 16-bit char and uses two 16-bit chars to represent the remainder. UTF-8, another common encoding, is frequently used for text stored in files or transmitted across networks. UTF-8 uses one to four 8-bit chars to encode all Unicode code ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Surviving the Whiteboard Interview: A Developer’s Guide to Using Soft Skills to Get Hired

Surviving the Whiteboard Interview: A Developer’s Guide to Using Soft Skills to Get Hired

William Gant
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9781118283400Purchase book