Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can we have a private constructor ?

Answers were Sorted based on User's Feedback



Can we have a private constructor ?..

Answer / namrata ahuja

no. constructors are always declared publicly. they are used
to initialize data members of a class. they are
automatically invoked by a class object declaration so if it
is private it cannot be invoked.

Is This Answer Correct ?    6 Yes 39 No

Can we have a private constructor ?..

Answer / ravi`

no,
we can not make a constructor private , if we make a
constructor private its method cannot access in main method .

Is This Answer Correct ?    17 Yes 136 No

Post New Answer

More OOPS Interview Questions

what is the difference between class to class type conversion and copy constructor ?

2 Answers  


What is the default size allocated for array in the statement if size not specified " int a[] "

4 Answers   CTS,


When will a constructor executed?

5 Answers   TCS,


Which keyword is written to use a variable declared in one class in the other class?

5 Answers   TCS,


what is code for call by value and call by reference?

1 Answers  


Why do we use encapsulation in oops?

0 Answers  


is there any choice in opting subjects like 4 out of 7

0 Answers  


What is multilevel inheritance?

0 Answers  


#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; a.x = 22; int c = a.x; int *b = new int; cout << c; return 0; } option: No output 0 22 -(11) Will not compile

1 Answers   CTS, Wipro,


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

0 Answers  


WAP to generate 2n+1 lines of the following pattern on the computer screen:

2 Answers  


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

0 Answers   Wipro,


Categories