How To Set Clear Toggle Check Change One Bit Of int Variable In C&C++?

Поделиться
HTML-код
  • Опубликовано: 19 окт 2024
  • JOIN ME
    -----
    RUclips 🎬 / @cppnuts
    Patreon 🚀 / cppnuts
    COMPLETE PLAYLIST
    ------------
    C++ Tutorial For Beginners: • Introduction To C++
    STL (Standard Template Library): • STL In C++
    ThreadIng In C++: • Multithreading In C++
    Data Structures: • Data Structure
    Algorithms: • Binary Search
    Design Patterns: • Factory Design Pattern...
    Smart Pointers: • Smart Pointer In C++
    C++14: • Digit Separator In C++
    C++17: • std string_view in C++...
    C++ All Type Casts: • static_cast In C++
    INTERVIEW PLAYLIST
    ------------
    C++ Interview Q&A: • Structural Padding & P...
    C++ Interview Q&A For Experienced: • How delete[] Knows How...
    Linked List Interview Questions: • Find Kth Node From Bac...
    BST Interview Questions: • Search Element In Bina...
    Array Interview Questions: • Reverse An Array
    String Interview Questions: • Check String Is Palind...
    Bit Manipulation Questions: • Find Set Bit In Intege...
    Binary Tree Interview Question: • Invert Binary Tree
    Sorting Algorithms: • Bubble Sort
    C++ MCQ: • Video
    C MCQ: • What printf returns af...
    C Interview Questions: • Designated Initializat...
    QUICK SHORT VIDEOS
    -------------
    C++ Short : • C++ Short Videos
    C Short : • Shorts C Programming MCQ
    In this video we'ill learn how to change set or unset selected bit of int variable in c and c++ programming language.
    For more details please watch full video and do let me know if there is any doubts in comment section.
    #cpp #interviewquestions #programming #tutorial #coaching #beginners #computerscience #softwareengineering

Комментарии • 30

  • @MrChrisiscool15
    @MrChrisiscool15 3 года назад +2

    Was looking for someone to explain it and found the one.
    Best explanation so far.
    Thank you

  • @mandeepsingh-mq9dr
    @mandeepsingh-mq9dr 3 года назад

    for checking a particular set bit , we can do int bit = number&(1

  • @Agreedtodisagree
    @Agreedtodisagree 4 года назад +1

    I keep coming back to this video. It's one of my bookmarks.

    • @CppNuts
      @CppNuts  4 года назад

      Glad you enjoy it!

  • @nagarajvannal8176
    @nagarajvannal8176 5 лет назад +4

    Clearly explained, Thank you.

  • @mactheo2574
    @mactheo2574 2 года назад

    Amazing clear explanation. Thank you!

    • @CppNuts
      @CppNuts  2 года назад

      Glad it was helpful!

  • @gousebashashaik2470
    @gousebashashaik2470 Год назад

    Great explanation.

  • @bunnyrabits
    @bunnyrabits 4 года назад +1

    wow! Best explaination ever. You are great sir!

    • @CppNuts
      @CppNuts  4 года назад

      So nice of you

  • @ronnysingh4165
    @ronnysingh4165 6 лет назад +3

    Amazing....Nice work

    • @CppNuts
      @CppNuts  6 лет назад

      I appreciate it!!

  • @gabrielsattemo7258
    @gabrielsattemo7258 2 года назад

    Amazing video!

  • @Raam1827
    @Raam1827 Год назад

    You said changing nth to bitvalue i have little confusion in it if i want to set some nth bit to 1 we have set operation like wise particular bit to 0 have clear operation and also have toggle then whats the use of this one??

  • @sudeshdhamke4937
    @sudeshdhamke4937 4 года назад

    I love the way u explained... Thanks

    • @CppNuts
      @CppNuts  4 года назад

      Thanks man!!

  • @Adnan-ss1ol
    @Adnan-ss1ol 3 года назад

    Good explanation thank you sir

    • @CppNuts
      @CppNuts  3 года назад

      Welcome dude..

  • @rampandi9302
    @rampandi9302 6 лет назад +2

    Very useful sir. Thanku

    • @CppNuts
      @CppNuts  6 лет назад

      Welcome dude!! 😎

  • @rahulkale1955
    @rahulkale1955 3 года назад

    thank you so much sir.

  • @vvpChannel3112
    @vvpChannel3112 2 года назад

    This was asked to me in some interview.

  • @gallilos
    @gallilos 4 года назад +1

    int actually have 32/64 bit yes? not only 4?

  • @pask4841
    @pask4841 5 лет назад

    Any idea how to create a function which can do this? I have been successful by using macro like functions, but they make it quite difficult to find an error, when you can't build.

  • @Vineeth_Shankar
    @Vineeth_Shankar 4 года назад

    How do you know that we have to use left shift negation and & operation to clear a bit?
    Please explain logic

  • @bittupandey6645
    @bittupandey6645 3 года назад

    best one

  • @TheTiznone
    @TheTiznone Год назад

    Cool now try to set 0th bit to 0 in number 1

  • @ritikshar
    @ritikshar 6 лет назад +1

    Thank you so much

    • @CppNuts
      @CppNuts  6 лет назад

      It's a pleasure!!