Thread: I have problem with the following problem can someone help with this

  1. #1
    Registered User
    Join Date
    Sep 2011
    Location
    Mumbai, Maharashtra, India
    Posts
    6

    I have problem with the following problem can someone help with this

    Match the following with reference to the following program segment:
    int i, j, = 25;
    int *pi, *pj = & j;
    …….
    ……. /* more lines of program */
    …….
    *pj = j + 5;
    j = *pj + 5 ;
    pj = pj ;
    *pi = i + j
    Each integer quantity occupies 2 bytes of memory. The value assigned to i begin at (hexadecimal) address F9C and the value assigned to j begins at address F9E. Match the value represented by left hand side quantities with the right.
    1. &i a. 30
    2. &j b. F9E
    3. pj c. 35
    4. *pj d. FA2

    Please tell me what can be the answer and how

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Come on, it can't be that difficult...

    EDIT: 2 bytes? Hmm... Do you use Turbo C++ by any( all ) chance? ^_^
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    Sep 2011
    Location
    Mumbai, Maharashtra, India
    Posts
    6
    yeah thanx for ur help i got the solution for this problem. really appreciate ur interest to help me.

  4. #4
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Quote Originally Posted by rushi245 View Post
    yeah thanx for ur help i got the solution for this problem. really appreciate ur interest to help me.
    Don't mention it!
    Devoted my life to programming...

  5. #5
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Can we perma-group-ban "areas"?..........................
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  6. #6
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by AndrewHunter View Post
    Can we perma-group-ban "areas"?..........................
    | :P |

  7. #7
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by AndrewHunter
    Can we perma-group-ban "areas"?..........................
    Yeah, we should perma-group-ban everyone from the areas around 8.3 light-minutes from the Sun
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #8
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Quote Originally Posted by laserlight View Post
    Yeah, we should perma-group-ban everyone from the areas around 8.3 light-minutes from the Sun
    Haha....fair enough.
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 10-16-2008, 07:30 PM
  2. sturct/pointer problem, and fscanf problem
    By hiphop4reel in forum C Programming
    Replies: 6
    Last Post: 07-28-2008, 09:40 AM
  3. Replies: 27
    Last Post: 10-11-2006, 04:27 AM
  4. Visual Studio Linker problem or my problem?
    By OOPboredom in forum C Programming
    Replies: 2
    Last Post: 04-13-2004, 12:32 AM
  5. syntax linked list problem & struct problem
    By beely in forum C Programming
    Replies: 5
    Last Post: 11-11-2002, 09:14 AM