Thread: pointers

  1. #1
    Registered User datainjector's Avatar
    Join Date
    Mar 2002


    Okay i have this code
    #include <stdio.h>
    int main()
        int i;
        int *ptr;
        int **pptr;
        i = 01234;
        ptr =  &i;
        pptr = &ptr;
        printf("**pptr = %u\n", **pptr );
        return 0;
    I get 668 but when i remove the 0 i get 1234 .If i put 3 for i it gives me 3 but if i put a 0 like 03 it gives me 83 .Why does it do that ..Thanks
    "I wish i could wish my wishs away"

    "By indirections find directions out" -- William Shakespears

    "Do what thou wilt shall be the whole of the law" -- Crowley "THE BEAST 666"

    Mizra -> love = Death...
    RDB(Rocks yooo)..

    Are you ready for the Trix ???

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Zero before a number denotes "octal", which is a base-eight number system instead of base-ten. 0x in front of a number uses hex which is base-sixteen.

    It has nothing to do with pointers.

    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using pointers to pointers
    By steve1_rm in forum C Programming
    Replies: 18
    Last Post: 05-29-2008, 05:59 AM
  2. function pointers
    By benhaldor in forum C Programming
    Replies: 4
    Last Post: 08-19-2007, 10:56 AM
  3. Request for comments
    By Prelude in forum A Brief History of
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  4. Staticly Bound Member Function Pointers
    By Polymorphic OOP in forum C++ Programming
    Replies: 29
    Last Post: 11-28-2002, 01:18 PM