In C, a structure cannot have static members, but in C++ a structure can have static members.
For example, following program causes compilation error in C, but works in C++.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.