Posts

Showing posts from November, 2023

DATA TYPE in C/C++

Image
  BUILT IN OF PRIMARY DATA TYPE     int (Integer) float(Floating-point) double (Double Floating-point) char (Character) wchar_t (Wide Character) bool (Boolean) void (Empty) Modified Data Types List    signed int - (used for integers) unsigned - int (can only store positive integers) short (used - for small integers (range -32768 to 32767)) unsigned short - (used for small positive integers (range 0 to 65,535)) Long - (used for large integers) unsigned long - (used for large positive integers ) long long - (used for very large integers) unsigned long long - (used for very large positive integers) long double - (used for large floating-point numbers) signed char - (used for characters (guaranteed range -127 to 127)) unsigned char - (used for characters (range 0 to 255)) Derived Type Data Type    Function Array Pointers References User-Defined Data Type   Class Structure Union Enumeration Typedef defined DataType

What Are Tokens in C/C++?

Image
  What Are Tokens?   In simple terms, tokens represent the smallest meaningful components of any program that the compiler easily comprehends. They can be classified into six sub-categories: 1. Keywords 2. Constants 3. Strings 4. Identifiers 5. Operators 6. Special Symbols Now, let's explore each category: Keywords : Keywords are reserved terms in programming languages that provide specific functionalities to the program. They cannot be used as variable names. C/C++ pre-processor directives, such as header files, can modify keywords before compilation.   Constants : Constants, like variables, are unchanging values. The key distinction is that the program cannot modify the value of a constant after it has been defined. Constants can belong to various data types, including integer, floating-point, octal, hexadecimal, character, and string constants.   Strings : Strings are arrays of characters ending with a null character "\0". They are enclo