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...

which is the easy way to divide any integer by 2?

Answer Posted / saranya

if s=10
s=s>>1

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can i access a direct (absolute, not the offset) memory address? here is what i tried: wrote a program that ask's for an address from the user, creates a FAR pointer to that adress and shows it. then the user can increment/decrement the value in that address by pressing p(inc+) and m(dec-). NOW, i compiled that program and opened it twice (in 2 different windows) and gave twice the same address to it. now look what happen - if i change the value in one "window" of the program, it DOES NOT change in the other! even if they point to the same address in the memory! here is the code snippet: //------------------------------------------------------ #include //INCLUDE EVERY KNOWN HEADER FILE #include //FOR ANY CASE... #include #include #include main() { int far *ptr; //FAR POINTER!!! long address; char key=0; //A KEY FROM THE KEYBOARD int temp=0; clrscr(); cout<<"Enter Address:"; cin>>hex>>address; //GETS THE ADDRESS clrscr(); (long)ptr=address; temp=*ptr; //PUTS THE ADDRESS IN THE PTR cout<<"["<

2359


What is c++ prototype?

1082


What is the difference between method overloading and method overriding in c++?

1083


What are the rules for naming an identifier?

1017


What are the various operations performed on stack?

1036


What are friend classes? What are advantages of using friend classes?

1044


Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

1047


What does h mean in maths?

1107


Mention the purpose of istream class?

1063


Can we overload operator in c++?

982


an integer constant must have atleast one a) character b) digit c) decimal point

983


What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

1145


What is the purpose of templates in c++?

989


What is the difference between the compiler and the preprocessor?

1054


Can malloc be used in c++?

1028