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
Explain what you mean by a pointer.
Define the process of error-handling in case of constructor failure?
What is meant by a delegate?
What is flush programming?
What new()is different from malloc()?
What are containers in c++?
Where Malloc(), Calloc(), and realloc() does get memory?
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
Define stacks. Provide an example where they are useful.
What is the sequence of destruction of local objects?
Is it possible to write a c++ template to check for a function's existence?
What is the full name of logo?
What are the implicit member functions of class?
What is virtual base class?
What is the purpose of ios::basefield in the following statement?