What does char *blank=".html" statement means ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swapnali143
    New Member
    • Mar 2012
    • 34

    What does char *blank=".html" statement means ?

    what is the folowing statement means ??
    char *blank=".html";
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    It creates a variable named blank that holds a pointer to a char and initialises it with the address of the string constant ".html".

    That is slightly frowned on today if you are going to store the address of a string constant you should use a const pointer, best practice is to assume that string constants are not modifiable since on some platforms they aren't.

    const char *blank=".html";

    Comment

    • swapnali143
      New Member
      • Mar 2012
      • 34

      #3
      Thanks a lot...........

      Comment

      Working...