what defference between c and c++ ?

Answers were Sorted based on User's Feedback



what defference between c and c++ ?..

Answer / sambhunath samanta

Difference is given below.
1.c is the structure programming language where c++ is the object oriented language.
2.c does not support class but c++ support class.
3.c++ also called c as class,that is the advance version of c.
4.c++ have operator overloading while c does't have operator overloading

Is This Answer Correct ?    22 Yes 0 No

what defference between c and c++ ?..

Answer / vaishali bhajbhuje

1. c is structure language while c++ is an object oriented language.
2. Function overloading is possible in c++ because in c++ calling depends on the fun-name and parameter list.
3. c is topdown parsing.c++ is bottom up parsing.
4. c can don only static binding while c++ can done static as well as dynamic binding.

Is This Answer Correct ?    6 Yes 0 No

what defference between c and c++ ?..

Answer / sunil s patil

1. C follows the procedural programming paradigm while C++
is a multi-paradigm language(procedural as well as object
oriented)

In case of C, importance is given to the steps or
procedure of the program while C++ focuses on the data
rather than the process.
Also, it is easier to implement/edit the code in case of
C++ for the same reason.

2. In case of C, the data is not secured while the data is
secured(hidden) in C++

This difference is due to specific OOP features like
Data Hiding which are not present in C.

3. C is a low-level language while C++ is a middle-level
language (Relatively, Please see the discussion at the end
of the post)

C is regarded as a low-level language(difficult
interpretation & less user friendly) while C++ has features
of both low-level(concentration on whats going on in the
machine hardware) & high-level languages(concentration on
the program itself) & hence is regarded as a middle-level
language.

4. C uses the top-down approach while C++ uses the bottom-up
approach

In case of C, the program is formulated step by step,
each step is processed into detail while in C++, the base
elements are first formulated which then are linked together
to give rise to larger systems.

5. C is function-driven while C++ is object-driven

Functions are the building blocks of a C program while
objects are building blocks of a C++ program.

6. C++ supports function overloading while C does not

Overloading means two functions having the same name in
the same program. This can be done only in C++ with the help
of Polymorphism(an OOP feature)

7. We can use functions inside structures in C++ but not in C.

In case of C++, functions can be used inside a structure
while structures cannot contain functions in C.

Is This Answer Correct ?    1 Yes 0 No

what defference between c and c++ ?..

Answer / sunil s patil

Answer


c is not object oriented but c++ is object oriented


Actually c is a procedural programming language which
cann't face the real world problem. It has some drawback
like a global data is shared by all function and if in a
large program it is find out difficult that which function
uses which data.

On the other hand c++ is an object oriented programming
language which eliminate some pitfall of conventional or
procedural programming language. It is a concept or
approach for designing a new software. It is nothing to do
with any programming language although a programming
language which support the oops concept to make it easier
to implement.

This is the main different between c and c++.



in c we use scanf function as standard input function,while
in c++ we use streame cin>> for input.like this for output
in c we use printf function,while in c++ we use cout<< as a
output function.


in c we use #include<stdio.h>as iclusion file,while in c++
we use #include<iostreame>as inclusion file.


IN c-programe the main function could not return a value
but in the c++ the main function shuld return a value



A function can be declared in C as int fun();. This means
that fun()is a function without any argument or any number
of arguments.But in C++, this means that the function with
no argument at all.

Is This Answer Correct ?    0 Yes 0 No

what defference between c and c++ ?..

Answer / ayan

1>c is the procedural language & c++ is the object oriented
programming methodology.

2>In c++ there 3 types of operator u-nary,binary,ternary.
But in c there is only 2 types u-nary,binary.

Is This Answer Correct ?    0 Yes 0 No

what defference between c and c++ ?..

Answer / guest

1.c is the structure programming language where c++ is the
object oriented language.
2.c does not support class but c++ support class.
3.c++ also called c as class,that is the advance version of c.
4.c++ have operator overloading while c does't have operator
overloading

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

hi , please send me NIC written test papers to sbabavalli@gmail.com

0 Answers   NIC,


What does nil mean in c?

0 Answers  


write a program in c language to print your bio-data on the screen by using functions.

0 Answers  


What is the meaning of typedef struct in c?

0 Answers  


What is #define size in c?

0 Answers  






What is a Genralised LInked List?? Please give a detailed explation of it..

1 Answers  


What is an identifier?

0 Answers  


write a program to count the no of repaeted words in a line?

1 Answers  


Agonistic behavior, or aggression, is exhibited by most of the more than three million species of animals on this planet. Animal behaviorists still disagree on a comprehensive definition of the term, hut aggressive behavior can be loosely described as any action that harms an adversary or compels it to retreat. Aggression may serve many purposes, such as Food gathering, establishing territory, and enforcing social hierarchy. In a general Darwinian sense, however, the purpose of aggressive behavior is to increase the individual animal’s—and thus, the species’—chance of survival. Aggressive behavior may he directed at animals of other species, or it may be conspecific—that is, directed at members of an animal’s own species. One of the most common examples of conspecific aggression occurs in the establishment and maintenance of social hierarchies. In a hierarchy, social dominance is usually established according to physical superiority; the classic example is that of a pecking order among domestic fowl. The dominance hierarchy may be viewed as a means of social control that reduces the incidence of attack within a group. Once established, the hierarchy is rarely threatened by disputes because the inferior animal immediately submits when confronted by a superior. Two basic types of aggressive behavior are common to most species: attack and defensive threat. Each type involves a particular pattern of physiological and behavioral responses, which tends not to vary regardless of the stimulus that provokes it. For example, the pattern of attack behavior in cats involves a series of movements, such as stalking, biting, seizing with the forepaws and scratching with tile hind legs, that changes very little regardless of the stimulus—that is, regardless of who or what the cat is attacking. The cat’s defensive threat response offers another set of closely linked physiological and behavioral patterns. The cardiovascular system begins to pump blood at a faster rate, in preparation for sudden physical activity. The eves narrow and the ears flatten against the side of the cat’s head for protection, and other vulnerable areas of the body such as the stomach and throat are similarly contracted. Growling or hissing noises and erect fur also signal defensive threat. As with the attack response, this pattern of responses is generated with little variation regardless of the nature of the stimulus. Are these aggressive patterns of attack and defensive threat innate, genetically programmed, or are they learned? The answer seems to be a combination of both. A mouse is helpless at birth, but by its l2th day of life can assume a defensive threat position by backing up on its hind legs. By the time it is one month old, the mouse begins to exhibit the attack response. Nonetheless, copious evidence suggests that animals learn and practice aggressive behavior; one need look no further than the sight of a kitten playing with a ball of string. All the elements of attack—stalking, pouncing, biting, and shaking—are part of the game that prepares the kitten for more serious situations later in life. 7) The passage asserts that animal social hierarchies are generally stable because: a) the behavior responses of the group are known by all its members. b) the defensive threat posture quickly stops most conflicts. c) inferior animals usually defer to their physical superior. d) the need for mutual protection from other species inhibits conspecific aggression. 8) According to the author, what is the most significant physiological change undergone by a cat assuming the defensive threat position? a) An increase in cardiovascular activity b) A sudden narrowing of the eyes c) A contraction of the abdominal muscles d) The author does not say which change is most significant 9) Based on the information in the passage about agonistic behavior, it is reasonable to conclude that: I. the purpose of agonistic behavior is to help ensure the survival of the species. II. agonistic behavior is both innate and learned. III. conspecific aggression is more frequent than i aggression. a) I only b) II only c) I and II only d) I,II and III only 10) Which of the following would be most in accord with the information presented in the passage? a) The aggressive behavior of sharks is closely inked to their need to remain in constant motion. b) fine inability of newborn mice to exhibit the attack response proves that aggressive behavior must be learned. c) Most animal species that do riot exhibit aggressive behavior are prevented from doing so by environmental factors. d) Members of a certain species of hawk use the same method to prey on both squirrels and gophers. 11) The author suggests that the question of whether agonistic behavior is genetically programmed or learned: a) still generates considerable controversy among animal behaviorists. b) was first investigated through experiments on mice. c) is outdated since most scientists now believe the genetic element to be most important. d) has been the subject of extensive clinical study. 12) Which of the following topics related to agonistic behavior is NOT explicitly addressed in the passage? a) The physiological changes that accompany attack behavior in cats b) The evolutionary purpose of aggression c) Conspecific aggression that occurs in dominance hierarchies d) The relationship between play and aggression 13) The author of this passage is primarily concerned with: a) analyzing the differences between attack behavior and defensive threat behavior. b) introducing a subject currently debated among animal behaviorists. c) providing a general overview of aggressive behavior in animals. d) illustrating various manifestations of agonistic behavior among mammals.

0 Answers   Accenture,


f(*p) { p=(char *)malloc(6); p="hello"; return; } main() { char *p="bye"; f(p); printf("%s",p); } what is the o/p?

7 Answers   Hughes,


why do some people write if(0 == x) instead of if(x == 0)?

0 Answers  


What is the difference between functions abs() and fabs()?

0 Answers  


Categories