[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

C and C++

Posted on 1997-11-12
1
Medium Priority
?
194 Views
Last Modified: 2010-04-10
1. Basic instruction for C and C++ languages.
2. What's the same between C and C++, including examples between this two.
3. What is pseudocode?
4. What's the different C and C++ algorithm?
thanx..
0
Comment
Question by:norisha
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 300 total points
ID: 1173105
First c++ comprises c but have more features c doesn't have.
Base unit of c++ is class, The nature of class as follows. First 32 bits are pointer to virtual table(vtable).Each element of the vtable is pointer to virtual function. When one class derived from another derived class is built so that first goes pointer to vtable then base class data and then derived class data. Derived class uses the same pointer to vtable but can replace some elements(pointers to virtual functions) so overwrite these functions. This is main advance of c++ - inheritance and polimorphism which leads to ability to write reusable code.
c++ is object oriented language but c is procedural oriented language. c++ class which describes the object defines its data as public which are accesible by outside world and represent object to outside world, protected which are restricted data and private used by object itself only. c structure has public members only. In c you create eachprocedure for each action in c++ you create each class for each object inhereting such class from similar objects thus reusing features which are common to these objects.  
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question