what are the disadvantages of C++?

Answer Posted / madhava rao

1.it is not secure
2.it is not simple
3.it is not platform independent
sucure:
beacuse c++ contains
->pointers
->friend functions
->globla variables
i am trying to prove it programaticaly;
ex:
#include<iostream.h>
#include<conio.h>
class A
{
int a;
void add();
{
a=45;
cout<<a;
}
};
void main()
{
clrscr();
// hear i am try ing to create new bolck

{
// in side this block i am trying to create an object of
//type "A"
A obj;
obj.add();
// hear we may think that "obj" life has ended
}
//hear i am trying to create an pointer variable of type "A"
A *p;
// hear i am tryint to call a method to the pointer of
//tyep "A"
//with out assign any address
p->add();//it works
// than where is the security for u r "obj" already life
//edned
}
NOTE:
i cal prove the remain things also with programatically
pls contact: SoftTech computer Education,new mig,bhel hyderabad,
cell:91-9291543127
mail id: madhav_rao34@yahoo.in

Is This Answer Correct ?    17 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism and its types?

595


write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

2761


What is byval and byref? What are differences between them?

1689


What is encapsulation selenium?

554


What is encapsulation and abstraction? How are they implemented in C++?

637






Why is there no multiple inheritance?

570


What are the important components of cohesion?

557


Prepare me a program for the animation of train

2000


What is inheritance write a program to show use of inheritance?

611


explain sub-type and sub class? atleast u have differ it into 4 points?

1834


What is debug class?what is trace class? What differences are between them? With examples.

1610


What does no cap mean?

592


What is constructor in oop?

589


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

1581


Can an interface inherit a class?

561