×

Character Set in C

Introduction

Every language has some basic elements which are used to represent information. The English language includes alphabets which together shape a sentence, after which the sentences are used to shape a paragraph.

Like every language, C also contains a set of characters which are used to represent information. The set of characters in C included alphabets, digits and special symbols. The language supports 256 characters in total.

Every program in C language consists of statements. The statements contain words, and the words are further constructed using characters from characters set in C.

The character set in C consists of the following set of characters:

  1. Alphabets
  2. Digits
  3. Special Symbols

Note: The characters set in C are both machine and user readable since they are from human understandable language.

Need of Characters

Every language has some basic elements which are used to represent information. The English language includes alphabets which together shape a sentence, after which the sentences are used to shape a paragraph, similar to this, a combination of different types of characters forms a program. The characters are building blocks to write a program.

Classification of Characters in C

The characters in C are classified into two types:

Source Characters

 

Alphabets

Digits

Special characters/symbols

White Spaces

Execution Characters

 

 

Source Characters

1) Alphabets:

The alphabets in ANSI C are the same as alphabets in the English language. Every alphabet in the english language is supported by the C language too and, this includes both upper and lowercase letters which together sums upto 52 alphabets.

  1. Lowercase letters - a to z
  2. Uppercase letters - A to Z

Note: The lowercase (small letters) and uppercase (caps letter) are distinct in the C programming language.

2) Numerical Digits:

The C language supports a total of 10 digits. These digits lie in the range from 0 to 9 and are used to construct numerical values.

Digits: 0,1,2,3,4,5,6,7,8,9

3) Special Symbols:

There are various types of special symbols supported by the C language. This rich set of special symbols includes symbols to perform;

  • Mathematical operations
  • Condition checking
  • White spacing
  • Backspaces

The following are the special characters contained by the C language language with their symbols and meaning:

Symbol   Meaning  
 ~ Tilde
 !Exclamation mark
 $Dollar sign
 #Number sign
( Lest parenthesis
 )Right parenthesis
_Underscore 
 +Plus sign
%Percent sign 
 ^Caret
 &Ampersand
  *Asterisk
 | Vertical bar
  \ Backslash
 ` Apostrophe
 " Quotation mark
 ; Semicolon
 < Opening angle bracket
 > Closing angle bracket
  ? Question mark
 , Comma
 .Period
  / Slash
 - Minus sign
 = Equal to sign
  { Left brace
  } Right brace
 [ Left bracket
] Right bracket
 :  Colon
 - Minus sign

Execution Characters

The execution characters in C are the characters which are invisible on the display window or console. The execution characters are related to ASCII values which are understood by the computer when a certain command is passed to the computer.

Conclusion

Every language has some basic elements which are used to represent information. Like every language, C also contains a set of characters which are used to represent information.

Character Set in C language

↓

Alphabets : a to z and A to Z
Digits :        0,1,2,3,4,5,6,7,8,9
Symbols :   ~, &, %, $, *, ^
Space :       Blank, back, tab etc

Related Topics

Two-Dimensional array in C

What is an Array? The collection of a fixed number of elements of homogeneous data types that are stored in contiguous locations in the memory is known as an array. Only...

6 minutes read.

Isalnum() function in C

Introduction: The isalnum () is a function used in C programming language. This function checks the passing number or argument is an alphanumeric number or not. The alphanumeric number consists of the...

3 minutes read.

How to open a C file on android mobile

A C file is a file that has a .c extension and contains code written in the C language. C is a computer programming language developed by Dennis Ritchie at...

4 minutes read.

Types of Function in C

A function is a piece of code that accomplish a certain operation for a specific task. There are two types of functions in C: System-defined function (Library Function)User-defined function 1. System defined Function...

8 minutes read.

What is 2s Complement in C?

The complement of 2s in C is generated from the 1s in C. As we know, the 1s complement of a binary number is generated by converting bit 1 to...

4 minutes read.

Bit Stuffing Program in C

What is a Bit Stuffing? The process of inserting one or more extra bits (0) into data is known as bit stuffing. To provide signalling information to a recipient, these are...

3 minutes read.

Bitwise XOR Operator in C

What is Bitwise? As we know, bits are the smallest unit of a number and are mostly used in a computing system. So, in bitwise, we do operations on bits instead...

3 minutes read.

Pointer arithmetic in C

In the C programming language, a pointer is an address which stores a numeric value. Hence, a developer can perform several arithmetic operations on the same just as one does...

4 minutes read.

memcpy() in C

Introduction: Here we discuss about the memcpy() function in C. The memcpy() function is also called the Copy Memory Block function. Used to create a copy of a specific drawing...

4 minutes read.

Format Specifier in C

Format Specifier in C Format specifiers can be described as an operator that is used to print the data referred by any object or variable in combination with the printf ()...

3 minutes read.

Flow Chart of Do while loop in C

This is a flowchart that represents the process of executing the Do while loop in the C programming language Generally, as we know there are three main components of Do While...

3 minutes read.

Diffie-Hellman Algorithm in C

Background: A method of public-key encryption known as elliptic curve cryptography (ECC) is based on the algebraic structure of elliptic curves over finite fields. To ensure equal security, ECC encryption requires fewer...

4 minutes read.

Remove an element from an array in C

A collection of objects or pieces of the same data type stored in a single memory block is known as an array. A data structure called an array is used...

3 minutes read.

Data Structures And Algorithms in C

C language is one of the most flexible and simple languages. So, it is always better to learn any concept in C language compared to other languages. Let us look...

13 minutes read.

Limitations of Inline Function in C

The compiler is unable to conduct inlining in two instances. It just accepts the inline definitions and produces space for the function in the same way it does for a...

3 minutes read.

Calloc in C

The calloc() is a library function in C which is used for memory allocation. The calloc() function dynamically allocates multiple blocks of memory to complex data structures. This includes data structures...

3 minutes read.

Merge and Merge sort with example in C

Assume we have two ordered Integer arrays, a[] and b[]. If we wish to combine them into another ordered array, such as c[], we can use the following straightforward technique. Compare...

3 minutes read.

Types of Array in C

What is an Array? One value can be stored in a variable at once. How many variables will you need if you have 100 values? Well, the answer isn't 100. It...

14 minutes read.

Ceil function in C

Introduction In the C Programming Language, the ceil function is a library function which is used to obtain the ceil value, i.e., it returns the smallest integer that is greater than...

4 minutes read.

C Decision control statement

Decision Making C conditional statements are used to specify one or more conditions. The statements will be executed if the condition becomes true otherwise alternative statement will be executed if the...

3 minutes read.