what is the main difference between c and c++?
Answer Posted / nitish
1. c is a procedure oriented language. whereas c++ is an
object oriented language.
2. c is an predecessor to c++.
3. c uses functions for input/output as,
scan f/print f.
where as,
c++ uses functions as,
cin>>/cout<<.
4. c acted as a middle level language in the system
functioning. as, a link between
machine language and higher level language.
5. C don't support but c++ support polymorphism and
inheritance in its functioning..
and so on,
but one similarity between both of the 2 is that,
Both are case sensitive languages.
"A" means different from "a".
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
What polymorphism means?
Give two or more real cenario of virtual function and vertual object
What is the highest level of cohesion?
What is the difference between inheritance and polymorphism?
What is pure oop?
What is inheritance in simple words?
Why do we use encapsulation in oops?
What is encapsulation process?
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
What is encapsulation with real life example?
write a program to find 2^n+1 ?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What is constructor overloading in oop?
Why do we need polymorphism in c#?