In how many ways we can initialize an int variable in C++?
Answer Posted / hrpynux@gmail.com
For example, to declare a variable of type int called x and initialize it to a value of zero from the same moment it is declared, we can write: int x = 0; A second method, known as constructor initialization (introduced by the C++ language), encloses the initial value between parentheses ( () ):
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What does namespace mean in c++?
If a base class is an adt, and it has three pure virtual functions, how many of these functions must be overridden in its derived classes?
Are php strings immutable?
What's the best free c++ profiler for windows?
What is the main purpose of overloading operators?
How do you establish an is-a relationship?
Is c or c++ more useful?
What are function prototypes?
What does ctime() do?
Does there exist any other function which can be used to convert an integer or a float to a string?
Which one between if-else and switch is more efficient?
Is swift faster than c++?
Differentiate between realloc() and free().
What is private inheritance?
Are c and c++ similar?