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 is the best it certification?
Can we use this pointer inside static member function?
Write a program which uses functions like strcmp(), strcpy()? etc
What is ofstream c++?
What is abstract class in c++?
What is the difference between #import and #include in c++?
Is c++ still in demand?
What are the advantages of using friend classes?
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).
What is ios in c++?
What is polymorphism and its type in c++?
Which should be more useful: the protected and public virtuals?
What is the average salary of a c++ programmer?
Show the declaration for a static member variable.
What is auto type c++?