char string



When we write

char *p = "xyz" ;

Many books state that compiler stores "xyz" in memory and returns
pointer to that memory
which is assigned to p . My question is , in what type of memory ,
heap or stack ?

Regards
Mangesh .

.



Relevant Pages

  • Re: Is this math test too easy?
    ... > communications glitch; one of the more laughable cartoons ... it was loaded into physical memory and, ... > Or one can interpret the character string as one of the values ... A pointer to an integer? ...
    (sci.math)
  • Re: grow list by tail, pointer example recipe -- please comment
    ... manufacturing a pointer with that address. ... the next cons cell. ... believe these lists are in consecutive memory locations. ...
    (comp.lang.lisp)
  • Re: some unanswered questions on C
    ... A pointer variable that's never been given a value. ... you don't know what memory you're modifying. ... >what i want to ask is that when i declare my buffer for fgets as ... "char *buffer" creates a pointer, ...
    (comp.unix.programmer)
  • Re: "Mastering C Pointers"....
    ... all means go ahead and dive right into the C language. ... Memory is a separate unit which just stores bits. ... A pointer at the hardware level _is an integer_. ... since loops make your logic more much ...
    (comp.lang.c)
  • Re: what is the purpose of C++ smart pointer
    ... pointer tracks the data it is referring to and updates itself ... following the changes of the memory it points to. ... How exactly will the smart pointer know that you moved the ... int * x = new int; ...
    (comp.os.linux.development.apps)