What is the difference between char *a and char a[]?

Author Topic: What is the difference between char *a and char a[]?  (Read 720 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 158
  • Karma: 0
    • We Helpline
Char a[] = “Name”
    The above statement allocates 5 memory location, for the above declared statement.
    Char *a = “Name”
    in front of a shows pointer declaration. The complier asks to place to hold the pointer. Memory address will given the name ‘a’ and it points to the array of seven character.


 

Related Topics

  Subject / Started by Replies Last post
23 Replies
9248 Views
Last post 02-04-2012, 13:06:47
by dany
6 Replies
4390 Views
Last post 10-24-2011, 00:30:13
by Hogward
21 Replies
15075 Views
Last post 12-04-2016, 23:34:48
by annarichart
34 Replies
23152 Views
Last post 03-25-2014, 06:13:10
by parijatziw
4 Replies
2663 Views
Last post 11-28-2012, 00:13:19
by DavisJoseph