freelanceprogrammers.org Forum Index » C

[PT]plz answer these C++ questions.


View user's profile Post To page top
divu_02 Posted: Wed Jan 19, 2005 1:09 am


Joined: 19 Jan 2005

Posts: 1
[PT]plz answer these C++ questions.
hello friends....
Could u plz answer these questions for me...
 
What is the difference between class & an object?What is RTTI?What are generic functions and generic classes?What is namespace?What is the difference between pass by reference & pass by value?When is memory allocated in a class?In C++ there is only virtual destructors,no constructors why?How is exception handling carried out in C++?Write a macro for swapping integers.
 
awaiting for ur reply..
 
regards,
divya.DIVYA

Yahoo! India Matrimony: Find your life partner
online.
Reply with quote
Send private message
View user's profile Post To page top
cuet_aj Posted: Wed Jan 19, 2005 12:01 pm


Joined: 19 Jan 2005

Posts: 3
[PT]plz answer these C++ questions.
Hi Guyzz!!
1.what is microlithic kernel and macrolithic kernel?
2.what is mutithreaded kernel and floating master kernel?heard like mutithreaded kernel is difficult to implement?and how do we implement it?
3.what do u mean by Gang scheduling?Heard that it is used to implement Multithreading concept?
4.Reagarding RunQueue which kernel uses to do services?which technique does it follow ?FIFO/Priority based?
5.Lastly,is Single threaded Kernel still in use?
cheers
satish
Do you Yahoo!? The all-new My Yahoo! – Get yours free!
Reply with quote
Send private message
View user's profile Post To page top
roohani15 Posted: Tue Jan 25, 2005 1:17 am


Joined: 25 Jan 2005

Posts: 8
[PT]plz answer these C++ questions.
Class : it is only a template , it describes as to what data the object will conatin & what operations can be performed on that data.Wheras the object will hold the data values describing the class.
 
What is the difference between pass by reference & pass by value?
In pass by value only the value of the variable is passed but in the pass by refrence the actual variable is passed & not its copy.
 
When is memory allocated in a class?
class ruhani
{
  int i;
  int j;

main()
{
  ruhani * obj = new ruhani; // now only the memory is allocated.
}
 
In C++ there is only virtual destructors,no constructors why?
 
lets take an example.
 
class A
{
public:
char *ch ;
  A()
  {
   ch = new char(20);
  }
~A()
{
  delete ch;
}
};
class B: public A
{
public:
 
char *ch2;
     B()
     {
       ch2= new char (30);
     }
 

 
main()
{
  B *obj = new B; // now as the main loop terminates the destructor will be called but since the destructor is not virtual so the destructor of base class  i.e ~A() will be  called, as a result the memory allocated by ch2 can never be freed therefore we always have virtual dest.  Since constructors cant be inherited therefore no need to define them as virtual. 
 
 
What are generic functions and generic classes?
for this i think stress is on templates
 
What is namespace?
it is actually a means to split global scope into sub-scope . 
divya shekar <divu_02@...> wrote:

hello friends....
Could u plz answer these questions for me...
 
What is the difference between class & an object?What is RTTI?What are generic functions and generic classes?What is namespace?What is the difference between pass by reference & pass by value?When is memory allocated in a class?In C++ there is only virtual destructors,no constructors why?How is exception handling carried out in C++?Write a macro for swapping integers.
 
awaiting for ur reply..
 
regards,
divya.
DIVYA
Yahoo! India Matrimony: Find your life partner online. To unsubscribe : programmers-town-unsubscribe@yahoogroups.com
Do you Yahoo!? All your favorites on one personal page – Try My Yahoo!
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help