What if one forget the [] when deleteing array allocated , C/C++ Programming

What if one forget the [] when deleteing array allocated through new T[n]?

A: All life comes to a disastrous end.

It is the programmer's responsibility not the compiler's to get the connection among new T[n] and delete[] p correct. If you get it incorrect, neither a compile-time nor a run-time error message will be generated through the compiler. Heap corruption is a likely result. Or worse. Your program will die probably.

 

Posted Date: 3/19/2013 8:43:19 AM | Location : United States







Related Discussions:- What if one forget the [] when deleteing array allocated , Assignment Help, Ask Question on What if one forget the [] when deleteing array allocated , Get Answer, Expert's Help, What if one forget the [] when deleteing array allocated Discussions

Write discussion on What if one forget the [] when deleteing array allocated
Your posts are moderated
Related Questions
What happens if you write following code? string& foo()

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

HWID Spoofer for Windows 7, 8 x64 Project Description: I want a simple program that will spoof my hardware id. I should be able to prepare the id to spoof to in the program a

write a function named "fact"that takes one integer arguments,call them "num" and returns as ..............


For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, int pos) Assuming t

Program which can check the given string is super ascii or not

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

C Program for DIVISER   void main() {           int result,number,min;           clrscr();           printf("ENTER THE NUMBER=");           flushall();

Write a program to calculate the total resistance of a series or parallel circuit. The maximum number of resistors is two.   We need to decide whether the user wants the to