what is the main difference between c and c++?
Answers were Sorted based on User's Feedback
Answer / priya
c language is top to bottom approach whereas c++ is bottom
to top approach
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / s prasanna kumar
C C++
DATA IS NOT SECURED SECURED
TOP DOWN BOTTOM-UP
FOCUS ON PROCEDURES FOCUS ON DATA
PROGRAMS ARE DECOMPOSED INTO OBJECTS
INTO FUNCTIONS
allocation is done NEW OPERATOR
with malloc statement
UNOINS AND ENUMS AVALIABLE
ARE NOT AVALIABLE
DOES NOT PROVIDE PROVIDES
DEFAULT ARGUMENTS
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / pavankumarreddy
c is an object based language where as c++ is an object
oriendted languague. c doesnot supports oops concept,c++
supports oops.
in c there is no cocept of operator overloading, where as
it is in c++.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / viji
C is the main of the came for c++,java.It is must important
to the c.C is doesn't support overloding.But c++ support
overloading.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer /
c is like coffee
but c++ is like coffee with extra sugar
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / amit chidrewar
data abstraction and data encapsulation not present in c
while these are features of c++.Moreover emphasis are doing
on procedures in c while in c++ emphasis is dealing in
objects.Inheritance,polymorphism not present in c.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / chandan seta
In c we use #include<stdio.h> but in c++ we use
#include<iostream.h>
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vaijayanthimala
c is a procedure oriented language and give importants to
procedure that is fuction rather than data.c is a middle
level language.
c++ is a object oriented language and give importants to
object that is data.c++ is high level language.
c does not provide class / object concept
c++ provides encapsulation ,data abstraction,polymorphism..
In c passing a value to a function is "call by value "
where c++ its " call by reference".
c is top to bottom programming approch.
c++ is bottom to top programmong approach.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / annie
1)C is procedure oriented language whereas c++ is object
oriented language.
2)C uses top down approach whereas c++ uses bottom up approach.
3)We can declare variables in the body of main() at the
beginning whereas we can declare variables anytime in c++
when we want to use them.
4)There is no concept of operator overloading in c whereas
there is a concept of operator overloading in c++.
| Is This Answer Correct ? | 0 Yes | 0 No |
How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
What is a class in oop?
Can a destructor be called directly?
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; a.x = 22; int c = a.x; int *b = new int; cout << c; return 0; } option: No output 0 22 -(11) Will not compile
Child cObj = new Parent() Wahts the output ?
What is virtual class and friend class?
What is public, protected, private?
What are the four main oops concepts?
How is data security provided in Object Oriented languages? ?
What is ambiguity in inheritance?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
What are classes oop?