What is the alternative character combination for a double quote character in C / C ++?

I have not had a directory of Kernighan and Ritchie C for many years, but I remember that there was a page that talked about how to enter characters that are not available to you. (WAY back that day, some keyboards lacked characters like ", ~, etc.).

To be clear, let me give an example. I'm not looking for a way to get quotes in strings, but instead I want to replace this:

printf("foo");

with this:

printf([alternate sequence]foo[alternate sequence]);

For the curious, I have an automated process that involves generating C / C ++ code, but a commercial tool (closed source) included quotes in its data streams, and it’s clear in the documentation that they don’t provide a way to avoid them.

EDIT:

, . . , , , , . , , , . PreprocessorDefinition. : :

Preprocessor Definitions     WIN32;_DEBUG;THINGIE=$(THINGIE)

, MSVC -, /D, , - script:

ENV['THINGIE'] = "??''Yodeling Monkey Nuggets??''"
run_msbuild_command

, C.

+5
6

trigraph "? , .

. .

+10

. :

 #define QUOTE(x) #x

a printf :

 printf(QUOTE(hello));
+8

 Character   Trigraph
 [           ??(
 \           ??/
 ]           ??)
 ^           ??'
 {           ??<
 |           ??!
 }           ??>
 ~           ??-
 #           ??=

"is not

+4

, trigraphs. , "" .

+3
, ( ) , , .

.

, - :

static const char foo[] = {'H', 'e', 'l', 'l', 'o', 0};

printf(foo);

dirkgently # , , ?

0

´ '?

, - .

-1

All Articles