What is the difference between char a[] = "string"; and
char *p = "string"; ?

Answer Posted / singamsa

we can not access a++ or a-- on array but we can do that in
pointers

array, address is constanct for that string, pointer is not
like that

Is This Answer Correct ?    43 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define C in your own Language.

801


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

853


Explain how are 16- and 32-bit numbers stored?

992


What is the most efficient way to count the number of bits which are set in an integer?

802


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

2108






What are the different data types in C?

918


Can you apply link and association interchangeably?

875


What are the general description for loop statement and available loop types in c?

883


What is an expression?

825


how to write a c program to print list of fruits in alpabetical order?

2050


What is scope of variable in c?

747


What is wrong with this program statement? void = 10;

1001


What is a structure member in c?

733


Can a local variable be volatile in c?

751


Explain what is the difference between #include and #include 'file' ?

769