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 method of creating object in C++ ?
Explain the difference between new() and malloc() in c++?
What are friend functions in C++?
How do we balance an AVL Tree in C++?
What is difference between malloc()/free() and new/delete?
What is a tree in c++?
What is the difference between cin.read() and cin.getline()?
Can a new be used in place of old mallocq? If yes, why?
Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?
What does ios :: app do in c++?
Mention the ways in which parameterized can be invoked.
Can a list of string be stored within a two dimensional array?
What is the difference between function overloading and operator overloading?
What are the classes in c++?