Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


what does this declaration mean?

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

Accepted Solution

phoffric earned 2000 total points
ID: 26110015
\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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

572 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