MCQs > IT & Programming > C++ > char * array = 'Hello'; char array[] = 'Hello'; What is the difference between the above two, if any, when using sizeof operator?

C++ MCQs

char * array = "Hello"; char array[] = "Hello"; What is the difference between the above two, if any, when using sizeof operator?

Answer

Correct Answer: The sizeof of an array gives the number of elements in the array, but sizeof of a pointer gives the actual size of a pointer variable

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it