turbo c

Discussion in 'C Programming' started by khan, May 8, 2010.

  1. khan

    khan Guest

    hi this is yousaf shah.. student no: 091304
    my quistion is...........
    what is pointer in turbo c...?
    khan, May 8, 2010
    #1
    1. Advertising

  2. khan

    Sjouke Burry Guest

    khan wrote:
    > hi this is yousaf shah.. student no: 091304
    > my quistion is...........
    > what is pointer in turbo c...?

    You are a pointer to an instance of the genus "lazy student".
    In TurboC such a pointer can cause irreparable damage to education.
    Sjouke Burry, May 8, 2010
    #2
    1. Advertising

  3. khan

    spinoza1111 Guest

    On May 8, 8:02 am, khan <> wrote:
    > hi this is yousaf shah..   student no: 091304
    > my quistion is...........
    >   what is pointer in turbo c...?


    Ak-salaam aleykum. A pointer in turbo C, or any C, is the actual
    address of the value in a "Von Neumann" stored program addressible
    machine such that every variable has a sequential address. This makes
    C rather different from other "high level languages" which conceal
    this value. However, the machine could theoretically be not Von
    Neumann because C does NOT allow one to take the address of a C
    "instruction", although entire functions may be passed as parameters.
    spinoza1111, May 8, 2010
    #3
  4. khan

    spinoza1111 Guest

    On May 8, 8:51 am, Sjouke Burry <>
    wrote:
    > khan wrote:
    > > hi this is yousaf shah..   student no: 091304
    > > my quistion is...........
    > >   what is pointer in turbo c...?

    >
    > You are a pointer to an instance of the genus "lazy student".
    > In TurboC such a pointer can cause irreparable damage to education.


    No, he's a human being. He and his mates may be having a chortle at
    the expense of the regs here who cannot (owing to their lack of
    computer science literacy) in fact answer these questions.
    spinoza1111, May 8, 2010
    #4
  5. khan

    spinoza1111 Guest

    On May 9, 5:24 am, Richard Heathfield <> wrote:
    > spinoza1111 wrote:
    > > On May 8, 8:02 am, khan <> wrote:
    > >> hi this is yousaf shah..   student no: 091304
    > >> my quistion is...........
    > >>   what is pointer in turbo c...?

    >
    > > Ak-salaam aleykum. A pointer in turbo C, or any C, is the actual
    > > address of the value in a "Von Neumann" stored program addressible
    > > machine such that every variable has a sequential address.

    >
    > int (*p)(void) = main;
    >
    > p is a counter-example to your claim, since it is a pointer to a
    > function, not a value.


    Thanks, Otto. Please do not be too disruptive today.

    Function pointers are less a counter-example and more an inelegant add-
    on, but correct, Otto, they constitute an extra type of pointer which
    does not constitute a pointer to a value (a series of instructions) to
    which C has access. Actually, it should have access to the actual
    compiled function's machine instructions.
    >
    > > This makes
    > > C rather different from other "high level languages" which conceal
    > > this value. However, the machine could theoretically be not Von
    > > Neumann because C does NOT allow one to take the address of a C
    > > "instruction", although entire functions may be passed as parameters.

    >
    > If you mean that C allows entire functions to be passed as parameters,
    > you are mistaken. Pointers to functions may be passed, but functions
    > themselves cannot.


    OK, I don't, Otto. I wouldn't want to be mistaken. I'm not a reg who
    gets to make mistakes on the order of Seebach's boners.

    The point is that you are so afraid of "being wrong" (there existing
    some interpretation of your words such that it's "wrong") you can't
    answer simple questions.
    >
    > --
    > Richard Heathfield <http://www.cpax.org.uk>
    > Email: -http://www. +rjh@
    > "Usenet is a strange place" - dmr 29 July 1999
    > Sig line vacant - apply within
    spinoza1111, May 9, 2010
    #5
  6. khan

    spinoza1111 Guest

    On May 9, 7:51 pm, pete <> wrote:
    > spinoza1111 wrote:
    >
    > > On May 8, 8:02 am, khan <> wrote:
    > > > hi this is yousaf shah..   student no: 091304
    > > > my quistion is...........
    > > >   what is pointer in turbo c...?

    >
    > > Ak-salaam aleykum. A pointer in turbo C, or any C, is the actual
    > > address of the value in a "Von Neumann" stored program addressible
    > > machine such that every variable has a sequential address.

    >
    > There's nothing in C which implies sequential addresses
    > for different variables.
    >
    > On my machine, if I declare only two one byte size variables,
    > char a = 0;
    > char b = 0;
    > they wind up with 3 unused bytes in between them.
    >
    > /* BEGIN new.c output */
    >
    > &a is 0012FF7C
    > &b is 0012FF78
    >
    > /* END new.c output */
    >
    > /* BEGIN new.c */
    >
    > #include <stdio.h>
    >
    > int main(void)
    > {  
    >     char a = 0;
    >     char b = 0;
    >
    >     puts("/* BEGIN new.c output */\n");
    >     printf("&a is %p\n", &a);
    >     printf("&b is %p\n", &b);
    >     puts("\n/* END new.c output */");
    >     return 0;
    >
    > }
    >
    > /* END new.c */
    >
    > --
    > pete


    OK, replace "sequential" by "ordinal".
    spinoza1111, May 9, 2010
    #6
  7. khan

    Guest

    In article <>,
    spinoza1111 <> wrote:
    > On May 9, 7:51 pm, pete <> wrote:
    > > spinoza1111 wrote:
    > >
    > > > On May 8, 8:02 am, khan <> wrote:
    > > > > hi this is yousaf shah.. student no: 091304
    > > > > my quistion is...........
    > > > > what is pointer in turbo c...?

    > >
    > > > Ak-salaam aleykum. A pointer in turbo C, or any C, is the actual
    > > > address of the value in a "Von Neumann" stored program addressible
    > > > machine such that every variable has a sequential address.

    > >
    > > There's nothing in C which implies sequential addresses
    > > for different variables.
    > >
    > > On my machine, if I declare only two one byte size variables,
    > > char a = 0;
    > > char b = 0;
    > > they wind up with 3 unused bytes in between them.


    [ snip ]

    >
    > OK, replace "sequential" by "ordinal".
    >


    Not that it matters, but I'm not sure that really helps -- I mean,
    in a system where an address consists of a segment identifier and
    an offset into the segment (and as best I can tell that would be
    AOK with the C standard), is there really any meaningful way to
    order pointers from different segments?

    Just sayin', maybe.

    --
    B. L. Massingill
    ObDisclaimer: I don't speak for my employers; they return the favor.
    , May 29, 2010
    #7
  8. khan

    Seebs Guest

    On 2010-05-29, blmblm myrealbox.com <> wrote:
    > Not that it matters, but I'm not sure that really helps -- I mean,
    > in a system where an address consists of a segment identifier and
    > an offset into the segment (and as best I can tell that would be
    > AOK with the C standard), is there really any meaningful way to
    > order pointers from different segments?


    Not really, especially because on many systems, there is substantial
    overlap, such that you can have two different {segment, offset} pairs
    which actually refer to the same byte of memory.

    -s
    --
    Copyright 2010, all wrongs reversed. Peter Seebach /
    http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
    http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
    Seebs, May 30, 2010
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kwaj

    VHDL code for Turbo Codes

    Kwaj, Jan 16, 2005, in forum: VHDL
    Replies:
    2
    Views:
    1,049
    solomen
    Feb 5, 2005
  2. Replies:
    0
    Views:
    1,658
  3. Developwebsites

    Turbo C++?

    Developwebsites, Sep 9, 2003, in forum: C++
    Replies:
    6
    Views:
    1,042
    llewelly
    Sep 9, 2003
  4. RamTurbo
    Replies:
    2
    Views:
    609
    Jeff Schwab
    Dec 23, 2003
  5. Replies:
    5
    Views:
    3,166
Loading...

Share This Page