Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the best it certification?

1120


Can we use this pointer inside static member function?

1070


Write a program which uses functions like strcmp(), strcpy()? etc

1094


What is ofstream c++?

1086


What is abstract class in c++?

1048


What is the difference between #import and #include in c++?

1106


Is c++ still in demand?

1146


What are the advantages of using friend classes?

1144


Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).

996


What is ios in c++?

1217


What is polymorphism and its type in c++?

1069


Which should be more useful: the protected and public virtuals?

1033


What is the average salary of a c++ programmer?

1018


Show the declaration for a static member variable.

992


What is auto type c++?

1121