Home >Backend Development >C#.Net Tutorial >How to output special symbols in C language?

How to output special symbols in C language?

烟雨青岚
烟雨青岚Original
2020-06-18 10:05:3414531browse

How to output special symbols in C language?

#How to output special symbols in c language?

Method to output special symbols:

1. Directly use ASCII code to output a single special symbol. For example: char c = 164;//Symbol '¤'

2. Use "escape character ASCII code" to output a string containing special symbols. For example: char* str = "abc\xa4";//"abc¤"

Escape characters: \xhh hh represents the hexadecimal ASCII code of the character.

How to output special symbols in C language?

Recommended tutorial: "C Language"

The above is the detailed content of How to output special symbols in C language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn