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 |
how to swap to variables without using thrid variable in java?
How to Increment the value of the empid E001 for each and every employee by using the programe?
2. Give the different notations for the class.\
Which language is pure oop?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
pointers are support in C#? if yes then how to use it?
8 Answers Softvision Solution,
what is static?
what uses of c++ language?
what is an instance of a class
Tell us about yourself.
47 Answers ABB, Amazon, Fidelity, Flextronics, Franklin Templeton, HCL, Hexaware, IBM, Impetus, Infosys, Reliance, Rofous, Silgate, Sutherland, TCS, Thomson Reuters, Virtusa, Wipro,
Define a class to represent a bank account. Include the following members: Data Members: Name of the Depositor Account Number Type of Account Balance amount in the account Member Functions: To assign the initial values. To deposit an account. To withdraw an amount after checking the balance. Write a C++ main program to display account number, name and balance.
what are the disadvantages of C++?
25 Answers ATS, Infosys, UNI, Wipro,