What is the difference between char a[] = "string"; and
char *p = "string"; ?
Answer Posted / karuna
a[] is a constant pointer to a string;
char *p is a pointer to a constant string;
In a[] address of a[] cant be change but string can be
change.
In char *p address can be change string cant be change
Is This Answer Correct ? | 15 Yes | 3 No |
Post New Answer View All Answers
What are the 5 types of organizational structures?
What is the importance of c in your views?
What are directives in c?
List some applications of c programming language?
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
How can I discover how many arguments a function was actually called with?
Multiply an Integer Number by 2 Without Using Multiplication Operator
Write a program of prime number using recursion.
Write the syntax and purpose of a switch statement in C.
What does c mean before a date?
What is a pointer value and address in c?
Is c high or low level?
Define recursion in c.
Which is better pointer or array?
Do you know what are bitwise shift operators in c programming?