In how many ways we can initialize an int variable in C++?



In how many ways we can initialize an int variable in C++?..

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

More C++ General Interview Questions

How do you flush a buffer in c++?

1 Answers  


Describe the setting up of my member functions to avoid overriding by the derived class?

1 Answers  


Explain the isa and hasa class relationships. How would you implement each?

1 Answers  


How does java differ from c and c++?

1 Answers  


What is c++ map?

1 Answers  


Specify some guidelines that should be followed while overloading operators?

1 Answers  


Differentiate between an array and a list?

1 Answers  


Define vptr.

1 Answers  


What is a .h file c++?

1 Answers  


How delete [] is different from delete?

1 Answers  


What are the types of pointer?

1 Answers  


What is size of a empty class?

7 Answers   Microsoft, Tata Elxsi, Wipro,


Categories