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 649 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 Advanced C Language (Test 9) November 6, 2022 Write a program to print numbers in an ‘X’ pattern as shown below October 25, 2022 Write a program to find the Largest and Smallest Array of Element October 25, 2022