Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Toggle nth bit in a given integer - num

Answer Posted / sahil

num=num ^ (1<<(n-1));

Is This Answer Correct ?    51 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

2022


What is the best way of making my program efficient?

969


What is the scope of global variable in c?

958


What is an lvalue?

1022


When is the “void” keyword used in a function?

1432


What is union and structure?

1046


What are categories used for in c?

1041


How can I convert a number to a string?

1099


What is the process of writing the null pointer?

984


What is c standard library?

1151


How can I read/write structures from/to data files?

927


What are nested functions in c?

979


please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

1958


using for loop sum 2 number of any 4 digit number in c language

2265


Write a program of prime number using recursion.

1042