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 2 October 2025

-

C++

C++ #16/35

Which of the following statements are true?

  1. A static data member is declared inside the class but its definition always appears outside the class.
  2. If a class has a static data member and two objects are created from this class, then each object would have its own static data member
  3. A user defined object can be declared as static data member of another class.
  4. A static member function can be called using the class name.
Author: Abha AgrawaStatus: PublishedQuestion passed 514 times
-1
Reviews from developers
developer avatar
Spelling / formatting error
Auteur anonyme
31/03/2024
unclear new lines for 3 & 4 answers
developer avatar
Obsolete
Auteur anonyme
10/02/2025
La définition d'une variable statique peut apparaître avec sa déclaration si elle est inline ou constexpr.

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