What normal C constructs work differently in C++?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is inheritance in oop?

682


What is object and example?

702


What are the data types in oop?

701


What are the benefits of oop?

703


What are the three parts of a simple empty class?

1608






What is use of overloading?

726


What is the important feature of inheritance?

728


write knight tour problem which is present in datastructure

2245


what are the ways in which a constructors can be called?

1675


What is abstraction in oops?

676


Is enum a class?

687


What is difference between pop and oop?

700


can we make game by using c

3567


What is polymorphism in oops with example?

641


What is inheritance write a program to show use of inheritance?

715