Sunday 16 October 2022

Special Operator in c++, C Language |SizeOf Operator in C, C++ |What is Operator in C, C++ |Type of Operators in C Language, C++ |Operators in Programming Language |What is ope in programming Language

   - : sizeof() operator :-

     Operators are those symbols which are used between operands to perform Mathematical and Logical operations.

    sizeOf() is a keyword which is used to determine the size of the variable or datatype in bytes.

Syntax:-

                   sizeof (DataType) 

_____________________________________________________________

A program for SizeOf() operator


#include<iostream>

using namespace std ;

int main () {

       int a;

      float b;

      char c;

      double d;


cout<<"size of integer = " <<sizeof(a) <<endl;

cout <<"size of float = " <<sizeof(b) <<endl;

cout<<"size of char = " <<sizeof(c) <<endl ;

cout<<"size of double = " <<sizeof(d)  <<endl;

return 0 ;

}

_____________________________________________________________


Output :-

          size of integer = 4

          size of float = 4

         size of char = 1

         size of double =  8

_____________________________________________________________

must read other operators :-


What is Operator in Programming Language 

What is Arithmetic Operator in Programming Language 

What is Relational Operator in C, C++ programming languages 

What is Logical Operators in C, C++ Programming Language (English Explanation) 

What is Logical Operator in C, C++ Language (Hindi Explanation) 

What is Bitwise Operator in C, C++

increment Decrement Operators in Programming Language 

Conditional Operators in Programming Language C++

Assignment Operators in Programming Language C++ 













No comments:

Post a Comment