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 vector pair in c++?

712


What is an html tag?

632


What are friend classes?

617


Is empty stack c++?

523


Is java easier than c++?

593






How many different levels of pointers are there?

658


Why do we learn c++?

532


write a porgram in c++ that reads an integer and print the biggest digit in the number

1773


By using c++ with an example describe linked list?

607


Is atoi safe?

603


Should the this pointer can be used in the constructor?

558


Explain virtual destructor?

677


write a programme to get a character and thier ASCII value

2598


What is a driver program?

634


Explain the differences between private, public and protected and give examples.

568