What is the difference between char a[] = "string"; and
char *p = "string"; ?
Answer Posted / dharanidhar
P is a pointer which is constant. So, the values in this
array cannot be modified.
characters within a[] can be changed by accessing
like a[1] = '2',....
Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
Why we use break in c?
What is meant by 'bit masking'?
What is the easiest sorting method to use?
What is c method?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
What is the use of header?
How can I split up a string into whitespace-separated fields?
Is c procedural or object oriented?
Is calloc better than malloc?
How to declare a variable?
Without Computer networks, Computers will be half the use. Comment.
Can two or more operators such as and be combined in a single line of program code?
Is it better to use a macro or a function?
Explain what is the purpose of "extern" keyword in a function declaration?
What is assignment operator?