Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 17th, 2007, 03:43 PM
Registered User
 
Join Date: Sep 2007
Location: Delhi, New Delhi, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please give me solution

Hi! friends
Please give me solution of this object
create a function invert(int x,int y,int n)
with n bits.That began at position inverted p.
you have to assume that x,p,n are integer and function will return an integer.
Ex.if x=181 in decimal , which is 10110101 in binary. and p=4, n=2.
then function will return 10101101 in binary and 173 in decimal.
the underlined bits are managed bits.
note that bit position counted from right to keft that count start with zero. therefore position 4 is fifth bit from right value.

Deepak Singh
Reply With Quote
  #2 (permalink)  
Old October 17th, 2007, 04:27 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

How about you make your own homework??

Looks like you didn't learn much from last time even though you were sooooo sorry.....

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
give me solution asudhakar ASP.NET 1.0 and 1.1 Basics 2 March 19th, 2007 09:33 AM
Please give me the solution to my example. vijaykumartaduri General .NET 4 March 7th, 2007 11:41 PM
hi expert! Can u give me solution for this???? jasdeephere ASP.NET 1.0 and 1.1 Professional 1 February 10th, 2007 02:16 AM
What is wrong in following code?Give me solution amit_mande@yahoo.com Pro VB.NET 2002/2003 1 September 19th, 2006 04:49 PM
CROSS_TAB,,, RTL problem, Plz Give me solution raza_mrk36 Crystal Reports 0 April 4th, 2006 02:33 AM



All times are GMT -4. The time now is 11:17 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.