what is the main difference between c and c++?
Answer Posted / er.ashish singh
1)C++ allows the programmer to create classes, which are
somewhat similar to C structures. However, to a class can
be assigned methods, functions associated to it, of various
prototypes, which can access and operate within the class,
somewhat like C functions often operate on a supplied
handler pointer.
2)Although it is possible to implement anything which C++
could implement in C, C++ aids to standarize a way in which
objects are created and managed, whereas the C programmer
who implements the same system has alot of liberty on how
to actually implement the internals, and style among
programmers will vary alot on the design choices made.
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
How to call a non virtual function in the derived class by using base class pointer
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What do you mean by Encapsulation?
What is multilevel inheritance?
What are the three main types of variables?
What is the difference between static polymorphism and dynamic polymorphism?
What is polymorphism in oops with example?
Explain the concepts involved in Object Oriented programming.
What makes a language oop?
What is constructor overloading in oop?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
How do you achieve runtime polymorphism?
What causes polymorphism?