Home > Backend Development > C++ > What is C token?

What is C token?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-08-31 08:49:06
forward
718 people have browsed it

What is C token?

This C program is a series of instructions, each instruction is a collection of individual units.

Each small individual unit in a C program is often called a token, and each instruction in a C program is a collection of tokens.

Tokens are used to build C programs, they are also known as the basic building blocks of C programs.

In a C program, tokens contain the following:

  • Keywords
  • Identifiers
  • Operators
  • Special symbols
  • Constant
  • String
  • Data value

In a C program, all these keywords, identifiers, operators, Collections of special symbols, constants, strings, and data values ​​are called tokens.

Example

The following is a C program for printing uppercase alphabetic characters

Demonstration

#include<stdio.h>
#include<conio.h>
int main(){
   int i;
   printf("ASCII ==> Character</p><p>");
   for(i = 65; i <= 90; i++)
      printf("%d ==> %c</p><p>", i, i);
   return 0;
}
Copy after login

Output

When the above program is executed, it produces the following results −

ASCII ==> alphabet Character
65 ==> A
66 ==> B
67 ==> C
68 ==> D
69 ==> E
70 ==> F
71 ==> G
72 ==> H
73 ==> I
74 ==> J
75 ==> K
76 ==> L
77 ==> M
78 ==> N
79 ==> O
80 ==> P
81 ==> Q
82 ==> R
83 ==> S
84 ==> T
85 ==> U
86 ==> V
87 ==> W
88 ==> X
89 ==> Y
90 ==> Z
Copy after login

The above is the detailed content of What is C token?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template