C++ Programming Question: Download Questions PDF
What is the difference between char a[] = “string”; and char *p = “string”;?
Answer:
In the first case 6 bytes are allocated to the variable a which is fixed, where as in the second case if *p is assigned to some other value the allocate memory can change.
Download C++ Programming Interview Questions And Answers
PDF
Previous Question | Next Question |
What can I safely assume about the initial values of variables which are not explicitly initialized? | What is the auto keyword good for in C++? |