What is the difference between char a[] = "string"; and
char *p = "string"; ?
Answer Posted / ashwin kumar
just one word i can say that
a[] is static memory allocation ( we cant increase size of
array while execution of program )
*p is a dynamic memory allocation ( where we can use
according to our requirement while execution )
their may be a waste age of memory and also their may be
limitaion of elements in array.
memory will not be wasted and size depends up on our
require ment in pointes
i hope its may be one of the defferance
if thier is any feed back or my answer is wrong plz write
to molugu.aswin@gmail.com
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
What is ctrl c called?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
What are loops c?
Describe the order of precedence with regards to operators in C.
What is memcpy() function?
How can you check to see whether a symbol is defined?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
What are identifiers c?
What is string function c?
Explain why c is faster than c++?
What is return type in c?
How many types of functions are there in c?
What is the use of the function in c?
Explain enumerated types in c language?
What is a rvalue?