what is the main difference between c and c++?
Answer Posted / saraswathi
Difference between c and C++
C C++
1. C is a procedure oriented programming C++ is a object
oriented programming
2. C uses #include<stdio.h> C++ uses #include<iostream.h>
3. In C main focus is on functions In C++ main focus is on
data rather than functions. Data is not freely moved around
the system rather the functions exists in the object are the
only means by which the data can be accessed
4. In C No Data security In C++ data is hidden and is
secure from unauthorised access
5. In C there is no concepts like encapsulation,
polymorphism , inheritance etc. C++ provide encapsulation,
polymorphism, inheritance etc.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
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?
What is the highest level of cohesion?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
what is difference between class template and template class?
Why multiple inheritance is not allowed?
What is encapsulation with real life example?
What does sksksk mean in text slang?
What is super in oop?
when to use 'mutable' keyword and when to use 'const cast' in c++
What is encapsulation and abstraction? How are they implemented in C++?
What is the diamond problem in inheritance?
What is abstraction in oops with example?
What is encapsulation in oop?
Why is oop better than procedural?
What is interface in oop?