Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

differentiate between
const char *a;
char *const a; and
char const *a;

Answer Posted / vignesh1988i

const char *a : means the string is constant and the pointer
is not...

const char *a="HELLO WORLD" , if we take this example for
the whole scope of the program the string is constant and we
can't assign any other string to that pointer 'a'....

char * const a : means the pointer is constant (address) but
string is not......

char * const a="hello world" , if we take this example ,
here the address will be always constant.... string can vary..

char const *a : means string is a constant and pointer is
not..... as we have seen from the first example...


thank u

Is This Answer Correct ?    37 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of operators in c?

1057


What is a newline escape sequence?

1098


Explain what are multibyte characters?

1185


The file stdio.h, what does it contain?

1154


Explain what is the difference between the expression '++a' and 'a++'?

1214


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1120


Explain what math functions are available for integers? For floating point?

1107


What are the types of type qualifiers in c?

1083


Can a pointer be volatile in c?

981


Write a program to implement queue.

1108


How do I create a directory? How do I remove a directory (and its contents)?

1165


What are control structures? What are the different types?

1086


what is recursion in C

1060


What is the difference between array and linked list in c?

1148


What type is sizeof?

1037