Latest Answer: I Think Computer languages have certain set of operators ,which the user can use while coding ,these operators have predefined meaning in the respective language i.e the operators can operate only on a specific set of variables/constants.Languages ...
How could I, in C++ declare a class point. The class point has two private data members x and y of type float. The class point has a parameterized constructor to initialize both the data members i.e. x and y. The class point has a member function display() that display the value of x and y. Create two objects p1 and p2 with your desired data and display the values of x and y of p1 and p2. Now create a third object p3 by using the expression p3=p1+p2 and display the values of x and y of p3.
Latest Answer: int **p;p=new int*[3];for(int i=0;i
Latest Answer: Public Class MySample Public Shared Sub Main() Console.WriteLine("Hello World") End SubEnd ClassForm the above example, it is well understood ...
Latest Answer: desturctor is to destory objects.this is denoted by '~'.for eg:class alpha{public:read(int);disp();~alpha();};void alpha::read(){couti;}void alpha::~alpha(int i){i--;cout
Latest Answer: merits: we can able to access the other class members in our class if,we use friend keyword. we CAN access the members without inheriting the class.demerits: Maximum size of the memory will occupied by objects according ...
Latest Answer: The output of the above programme will be b=0.5 .7 is not stored as 0.7 ie it is stired to some value which is slightly less that 0.7 so the control will not work as expected [this is the only excception i guess for floating point nos] ...
Could any one explan me what happens in this program. main(){ int i=10; i=(++i)/(i++); printf("i=%d",i); }
Latest Answer: Abstraction is just like a Hotel room where a single person wants only
1bed+bathroom but family required minimum of double bed +bathroom. Whereas few
people want AC system or hot water system or TV like accessories but other
don’t. During the ...
Can the function by which we get values for object strictly follow the data hiding rule in oops?if no,why?e.g void student ::getdata() { coutname; - - - - }void main(){ student s; s.getdata(); getch();}
View page << Previous 1 2 3 [4] 5 6 7 8 9 10 Next >>

Go Top