What normal C constructs work differently in C++?
Answers were Sorted based on User's Feedback
Answer / guest
- Assigning int's to enum's.
- Assigning void pointers to other types of pointers.
- Function declaration foo() without parameters.
- Character constants are of type char in C++. They are of
type int in C.
- ALL functions MUST be prototyped in C++, which is not
required in C.
- In C++:
struct A { /* ... */ };
is equivalent to:
typedef struct A { /* ... */ } A;
in C.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / achal ubbott
I just add 2 more points. C++ is a different language. Its
syntax matches to C accidentally.
1. C++ follows a name mangling algorithm for names of
functions. C does not.
2. C++ structures may have functions defined in them. Not
in C.
3. C++ follows more strict type checking.
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the new version of oops
Can we define a class within the interface?
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
In which cases you use override and new base?
What are the advantanges of modularity
What do you mean by Encapsulation?
what is the application of oops?
What is polymorphism explain its types?
Contrast OOP and SOA. What are tenets of each?
1 Answers Siebel Systems, Wipro,
What is polymorphism and types?
How many human genes are polymorphic?
which structured data type is not used in c++? 1.union 2.structure 3.string 4.boolean