Breaking

मंगलवार, 14 अप्रैल 2020

BCA 2nd Sem Notes-Shift operators

  • UNIT-I (Array)
Definition
Declaration & initialization of 1D 
Accessing array elements
Displaying array elements
Sorting arrays
Arrays and function
Declaration & initialization of 1D
Accessing and Displaying
Memory representation of array [Row Major, Column Major]
Multidimensional array


  • UNIT-II (Pointers)
  • Definition
    Declaration & initialization
    Indirection operator
    address of operator
    pointer arithmetic
    dynamic memory allocation
    arrays and pointers
    function and pointers


  • UNIT-III (Strings)



  • UNIT-IV (Structures)
  • Definition

  • UNIT-V                                  (C Preprocessor)



  • UNIT-VI                                (File Handling)


  • Shift operators

    Left Shift and Right Shift Operators in C/C++ << (left shift) Takes two numbers, left shifts the bits of the first operand, the second operand decides the number of places to shift. ... >> (right shift) Takes two numbers, right shifts the bits of the first operand, the second operand decides the number of places to shift


    Two move administrators move the bits in a whole number variable by a predefined number of positions. The << administrator shifts bits to one side, and the >> administrator shifts bits to one side. The punctuation for these double administrators is 



    x << n 



    also, 



    x >> n 

    Every administrator moves the bits in x by n positions in the predefined heading. For a correct move, zeros are submitted in the n high-request bits of the variable; for a left move, zeros are put in the n low-request bits of the variable. Here are a couple of models:


    कोई टिप्पणी नहीं:

    एक टिप्पणी भेजें