fr

Daily Challenge 🗓️

Your daily dose of technical intelligence to shine in (developer) society.

Discover a software development quiz per day with its detailed correction.

Frontend, Backend, Mobile, Data, Web, AI, Infra... Everything that can be coded!

Thursday 11 June 2026

-

C++

C++ #20/39

Consider the following code fragment:

class Person{
public:
//default constructor
//…
 
//destructor
~Person(){
}
};
int main(int argc, char **argv)
{
..
Person *ps = new Person[10];
..
if(NULL != ps)
delete[] ps;
 
return 0;
}
 

What does declaring variable ‘ps’ in main() do?

Author: Abha AgrawaStatus: PublishedQuestion passed 489 times
2
Reviews from developers
developer avatar
Auteur anonyme
25/09/2025
The first choice is also correct...

About Daily Challenge 🗓️

From Monday to Friday, discover each day a quiz question with its detailed answer to enrich your tech knowledge. The questions are proposed by the WeLoveDevs.com community: experienced developers, trainers and freelancers.WeLoveDevs.com helps developers to find their dream job. We also provide over 50 free technical tests in different technologies for those of you who would like to test your knowledge.

History

    ⚠️
    Your browser is badly|not supported!
    We recommend you to use a more modern browser such as Edge, Chrome or Firefox
    Know More