Results 1 to 2 of 2

Thread: About C

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Answers
    18

    About C

    Can I exchange two int pointers ?


  2. #2
    Contributing Member
    Join Date
    Apr 2007
    Answers
    58

    Re: About C

    Yes, Use a third int pointer to exchange the variables.
    int *p, *n, * x;
    int a,b;
    p=&a; n=&b;
    x=p; p=n; n=x;

    Regards,
    Anoop :)
    If its useful, dont forget to [COLOR="Red"]THANK[/COLOR] me :cool:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact