What are the different types of variables in C++?



What are the different types of variables in C++?..

Answer / nashiinformaticssolutions

The memory size and arrangement of a variable, the values that can be stored there, and the actions that can be performed on the variable are all determined by the kind of variable. In C++, /* 0some of the primary variable types are:
Char is used to hold single characters.• integers are stored int.
• float: holds values in floating-point format.
• double: doubles the precision of float by storing floating-point numbers.
• void: denotes the lack of a type.
The value stored in a bool is either "true" or "false."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Differentiate between the message and method in c++?

1 Answers  


What is the error in the code below and how should it be corrected?

1 Answers  


class A { public: void f(); protected: A() {} A(const A&){} }; Examine the class declaration shown above. Why are the default and copy constructors declared as protected? 1. To ensure that A cannot be created via new by a more derived class 2. To ensure that A cannot be copied 3. To ensure that A cannot be used as a base class except when public inheritance has been used 4. To ensure that A cannot be created/copied outside the inheritance chain 5. To ensure that A cannot be instantiated as a static variable

1 Answers  


What is near, far and huge pointers? How many bytes are occupied by them?

1 Answers  


what is COPY CONSTRUCTOR and what is it used for?

1 Answers  


What is the extraction operator and what does it do?

1 Answers  


How to implement flags?

2 Answers   Symphony,


What is data type in c++?

1 Answers  


Is c++ a programming language?

1 Answers  


How would you stop a class from class from being derived or inherited?The constructer should not be Private,as object instantiation should be allowed.

15 Answers   Satyam,


what does the following statement mean? int (*a)[4]

1 Answers  


How to reduce a final size of executable?

3 Answers  


Categories