what does this declaration mean?

Posted on 2009-12-22
Last Modified: 2012-05-08
:const char* TOKEN = "\xbb\xbb";
Question by:Vlearns
    1 Comment
    LVL 31

    Accepted Solution

    \x is the start of an escape sequence whose format is:
    \xhh, where hh are ASCII characters in hexadecimal notation

    Hex chars are in range 0..f

    So, here is an example of a constant literal:
          const char val1 = '\xbb';
    In this case, val1 has the value 0xbb

    In your example, TOKEN is a pointer to a string having 3 bytes:
    0xbb  0xbb  0x00 (the 3rd being the string null terminator byte.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (, discussed installing the Solaris Operating S…
    Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
    The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now