Write a program to check Nth bit is set or not, if yes, clear the Mth bit Post author:Coding Safar Post published:October 25, 2022 Post category:C Assignment / C Language Basics / C Programming / C Programming for Beginners Description:Read a number, M and N from the user. You need to check whether N th bit is set(1) or not, If yes, then you need to clear the M th bit of the number and print the updated value of numPre-requisites:Bitwise operatorsSample Execution:Test Case 1:Enter the number: 19Enter ‘N’: 1Enter ‘M’: 4Updated value of num is 3 Test Case 2:Enter the number: 19Enter ‘N’: 2Enter ‘M’: 4Updated value of num is 19 347 Tags: C Language Basics, C Programming Share With Your Friends Share this content Opens in a new window X Opens in a new window Facebook Opens in a new window LinkedIn Opens in a new window WhatsApp Read more articles Previous PostWrite a program to count the number of set bits in a given number and print the parity Next PostWrite a program to find the average of elements stored in an array You Might Also Like Free Online Skill Test C Language Basics (Test 4) October 28, 2022 Free Online Skill Test C Language Basics (Test 3) October 25, 2022 Write a program to find the Largest Array Element October 25, 2022