Skip to main content

Data Types in C++

Basic Data types: The basic data types are integer-based and floating-point based. C++ language supports both signed and unsigned literals.


The memory size of basic data types may change according to 32 or 64 bit operating system. 

Let's see the basic data types. It size is given according to 32 bit OS.



Data TypesMemory SizeRange
char1 byte-128 to 127
signed char1 byte-128 to 127
unsigned char1 byte0 to 127
short2 byte-32,768 to 32,767
signed short2 byte-32,768 to 32,767
unsigned short2 byte0 to 32,767
int2 byte-32,768 to 32,767
signed int2 byte-32,768 to 32,767
unsigned int2 byte0 to 32,767
short int2 byte-32,768 to 32,767
signed short int2 byte-32,768 to 32,767
unsigned short int2 byte0 to 32,767
long int4 byte
signed long int4 byte
unsigned long int4 byte
float4 byte
double8 byte
long double10 byte

  1. Derived Data Types:
     The data-types that are derived from the primitive or built-in datatypes are referred to as Derived Data Types. These can be of four types namely:
    • Function
    • Array
    • Pointer
    • Reference

C++ Keywords(की वर्ड )

A keyword is a reserved word. You cannot use it as a variable name, constant name etc. A list of 32 Keywords in C++ Language which are also available in C language are given below.


autobreakcasecharconstcontinuedefaultdo
doubleelseenumexternfloatforgotoif
intlongregisterreturn
short
signedsizeofstatic
structswitchtypedefunionunsignedvoidvolatilewhile


C++ Operators(ऑपरेटर्स )

An operator is simply a symbol that is used to perform operations. There can be many types of operations like arithmetic, logical, bitwise etc.

There are following types of operators to perform different types of operations in C language.
  • Arithmetic Operators(अर्थमेटिक ऑपरेटर्स )
  • Relational Operators(रेलशनल ऑपरेटर्स)
  • Logical Operators(लॉजिकल ऑपरेटर्स )
  • Bitwise Operators(बिट् वाइज ऑपरेटर्स)
  • Assignment Operator(अस्सैंमेंट ऑपरेटर्स) 
  • Unary operator(यूनरी ऑपरेटर्स )
  • Ternary or Conditional Operator
  • Misc Operator


(ऑपरेटर्स in C++)
Dear Students :-ऊपर लिखे ऑपरेटर्स को बहुत अच्छे से read out करना है क्योकि ये ओपेरटस से ही हम लोग प्रोग्राम्स में Help लेंगे | 



Comments

Popular posts from this blog

Memory Hierarchy

Memory Hierarchy A memory unit is an essential component in any digital computer since it is needed for storing programs and data. Typically, a memory unit can be classified into two categories: The memory unit that establishes direct communication with the CPU is called  Main Memory . The main memory is often referred to as RAM (Random Access Memory). The memory units that provide backup storage are called  Auxiliary Memory . For instance, magnetic disks and magnetic tapes are the most commonly used auxiliary memories. Apart from the basic classifications of a memory unit, the memory hierarchy consists all of the storage devices available in a computer system ranging from the slow but high-capacity auxiliary memory to relatively faster main memory. The following image illustrates the components in a typical memory hierarchy. Auxiliary Memory Auxiliary memory is known as the lowest-cost, highest-capacity and slowest-access storage in a computer system....

Objective Question of Computer Networking

  1.    Choose the correct meaning of the Greek word ‘tele’ in       context of telecommunication. A.   Near B.   Far C.   Never D.   Always   2.    Find the correct term used for the standards that have       been legislated by an officially recognized body.    A.   De jure B.   De facto C.   User standards D.   Channel standards   3.    Which agency developed standards for physical       connection interfaces and electronic signaling       specifications?      A.    ISO B.    ITU C.    ANSI D.    EIA   4.     Find full form of ANSI. A.    American Network Signal Institute B.    American National Signal Institute C.    American National Stand...

CLASS-11 (Python Programming Language)

  Python Programming Language Python is a high-leve l, general-purpose and a very popular programming language. Python programming language (latest Python 3) is being used in web development, Machine Learning applications, along with all cutting edge technology in Software Industry. Python Programming Language is very well suited for Beginners, also for experienced programmers with other programming languages like C++ and Java. Below are some facts about Python Programming Language: Python is currently the most widely used multi-purpose, high-level programming language. Python allows programming in Object-Oriented and Procedural paradigms. Python programs generally are smaller than other programming languages like Java. Programmers have to type relatively less and indentation requirement of the language, makes them readable all the time. Python language is being used by almost all tech-giant companies like – Google, Amazon, Facebook, Instagram, Dropbox, Uber… etc. The biggest stren...