What is static function and static class?

Answer Posted / anthony michael

Sourisengupta

Static Class is not possible in C++. But it can be done in
Managed C++

Static Class:
For Static Class we can't create Instances and It can only
hold Static member's.

Creating a static class is therefore much the same as
creating a class that contains only static members and a
private constructor. A private constructor prevents the
class from being instantiated.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you differentiate between inheritance and implementation in c++?

637


What is virtual methods?

652


Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

608


What are the differences between malloc() and calloc()?

607


What is srand c++?

569






What are the uses of static class data?

628


List the issue that the auto_ptr object handles?

603


How do you add an element to a set in c++?

547


What is the use of :: operator in c++?

591


How would you use qsort() function to sort an array of structures?

712


What is the use of endl in c++?

587


How do I run a program in notepad ++?

592


What are structs in c++?

596


What are the various compound assignment operators in c++?

539


Can we define function inside main in c++?

544