Solved

C and C++

Posted on 1997-11-12
1
189 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 100 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

Technology Partners: 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

Suggested Solutions

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

749 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