what is the main difference between c and c++?

Answers were Sorted based on User's Feedback



what is the main difference between c and c++?..

Answer / rohit singh

c++ is advance version of c.
In c security is less as compare of c++
In c progarm is difficult as compare to c++.

Is This Answer Correct ?    2 Yes 3 No

what is the main difference between c and c++?..

Answer / shubhangi

In C++ when any exception occurs it can be handled with the
help of exception handling mechanism while no such facility
available in c
exception execution eg.array out of bound,dividing a number
by zero.

Is This Answer Correct ?    0 Yes 1 No

what is the main difference between c and c++?..

Answer / gopi challuri

c is structured oriented language nd c++ is object oriented
language.
And one more main difference is in c++ v introduced Classes
and objects a new way after structures in c.
and in cpp v can code the program by divide and rule policy
but not in c and v hav to write everything in main and in
cpp v hae oops concept which can run the progran more
efficiently.
but main advantage of c is till now every one using c
language coding in operating systems like windows and in
linux\.
so for normal use cpp is best than c
but for he main coding purpose c in best /

Is This Answer Correct ?    0 Yes 1 No

what is the main difference between c and c++?..

Answer / sridivyapuvvada

C is object based language & C++ is object oriented
language.
C is top-bottom approach & C++ is bottom-top approach.
In C,we use PRINTF() ,SCANF() as standard input/output
functions & in C++,we can use COUT<< or CIN>> as standard
input/output function.
In C we are using #include<stdio.h> as header file, but
in C++ we are using #include<iostream.h> as header file.
C doesn't support operator overloading & C++ support
operator overloading.
C does not support the c++ programme but C++ support the C
program.

Is This Answer Correct ?    2 Yes 3 No

what is the main difference between c and c++?..

Answer / lalit

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

ALTER PROCEDURE [dbo].[sp_VIEWQUALIFICATIONINFO]
@StdId INT
AS
SELECT * FROM Qualification
WHERE StdId=@StdId
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

ALTER PROCEDURE [dbo].[sp_VIEWPERSONALINFO]
@StdId INT
AS
SELECT
FName,MName,LName,FatherName,Gender,DOB,MStatus,Email,Phone,
Mobile,CourseID,Status FROM personalinfo
WHERE StdId=@StdId\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

protected void Button1_Click(object sender, EventArgs e)
{
ds = objd1.GetDetailsById(Convert.ToInt32
(txtstudentid.Text));
ds =objd1.GetPersonalInfoById(Convert.ToInt32
(txtstudentid.Text));
grdqualificationinfo.DataSource=ds.Tables
["Qualification"];
grdqualificationinfo.DataBind();
grdpersonalinfo.DataSource=ds.Tables
["personalinfo"];
grdpersonalinfo.DataBind();
lblqualinfo.Visible = true;
lblpersonalinfo.Visible = true;
//objrd = objd1.GetDetailsById(Convert.ToInt32
(txtstudentid.Text));
//objrd.Read();


//txtcoursename.Text = objrd[0].ToString();
//txtcoursefees.Text = objrd[1].ToString();

lblcoursefees.Visible = true;
lblcoursename.Visible = true;
txtcoursename.Visible = true;
txtcoursefees.Visible = true;


}
//////////////////////////////////////////
class////////////////////////

public DataSet GetPersonalInfoById(int StdId)
{
con.Close();
con.Open();
cmd = new SqlCommand("sp_VIEWPERSONALINFO", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@StdId",StdId);
adap = new SqlDataAdapter(cmd);
adap.Fill(ds, "personalinfo");
return ds;
}

public DataSet GetDetailsById(int StdId)
{
con.Close();
con.Open();
cmd = new SqlCommand("sp_VIEWQUALIFICATIONINFO",
con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("StdId",StdId);
adap = new SqlDataAdapter(cmd);
adap.Fill(ds, "Qualification");
return ds;
}

Is This Answer Correct ?    2 Yes 3 No

what is the main difference between c and c++?..

Answer / balaji

header file in c is <iostream.h> and in c++ it is <stdio.h>
input in c is cin>> and in c++ it is scanf

Is This Answer Correct ?    2 Yes 3 No

what is the main difference between c and c++?..

Answer / madhav

in c we use ()type of brackets but in c++ we use angular
brackets for input and standered output functions

Is This Answer Correct ?    2 Yes 3 No

what is the main difference between c and c++?..

Answer / balakrishna

c is a procedure oriented program.where as c++ is a object
oriented program.c++ is advanced of c.some draw backs in c
are rectified and introduced in c++.in c++ we use mostly
classes.in c the variables are used in program are used by
any function in the program so there is no security in
c.where as in c++ our data is secured by declaring private.

Is This Answer Correct ?    1 Yes 2 No

what is the main difference between c and c++?..

Answer / hahaha

The main difference is In C and C++ is ++ is not there in
C.HAhAhhahaha..

Is This Answer Correct ?    2 Yes 3 No

what is the main difference between c and c++?..

Answer / pooja

c is a procedure oriented language
c++ is a structure oriented language

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More OOPS Interview Questions

#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

1 Answers   CTS, Wipro,


What is the importance of oop?

0 Answers  


Question In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Question Submitted By :: Sunil Kumar I also faced this Question!! Rank Answer Posted By Re: In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Answer # 1 use copy constructors 0 Shanthila There is something to be taken care in destructor, in copy constructor, suppose the memory is assigned to the embedded member object pointer with the parameter passed value, but if some other objects of different class also are pointing to this memory, then if some one deletes the object then this class member pointer object will become dangling, or if the object is not deleted properly then there will be memory leak. Please suggest the design change required to handle or avoid this situation

0 Answers   TCS,


WILL I GET A guaranteed JOB AFTER DOING bsc()IT) and GNIIT from an NIIT CENTRE??

21 Answers   Biocon, MIT, NIIT,


How many human genes are polymorphic?

0 Answers  






what is a virtual class?

5 Answers   Cap Gemini, IBM, Infosys, Trinity Technologies,


what i oops concept, how many languages supports oops concept?

3 Answers   Value Labs,


How do you achieve polymorphism?

0 Answers  


write a short note on Overloading of Binary Operator?

2 Answers  


Which is faster post increment or pre increment ? and in which cases should u use either - to increase speed?

4 Answers   EA Electronic Arts,


Are polymorphisms mutations?

0 Answers  


can main method be overloaded...??? How..????

2 Answers   Satyam,


Categories