Define difference among delete and delete[]?, C/C++ Programming

when you allocate memory with new[], you ought to free the memory via delete[]. While you allocate memory along 'new', then use 'delete' with no the brackets. You employ new[] to allocate an array of values (always beginning at the index 0).

 

Posted Date: 3/16/2013 3:21:34 AM | Location : United States







Related Discussions:- Define difference among delete and delete[]?, Assignment Help, Ask Question on Define difference among delete and delete[]?, Get Answer, Expert's Help, Define difference among delete and delete[]? Discussions

Write discussion on Define difference among delete and delete[]?
Your posts are moderated
Related Questions
Write a program to add co-ordinates of the plane The class having x and y co-ordinates. Create three objects. Use a constructor to pass one pair of co-ordinates and a funct

A: no, can't. The names of, precedence of, associativity of, and arity of operators is fixed through the language. In C++, there is no operator** so you cannot create one for a

C Program for FUNCTION OF COUNT THE CHARACTERS IN EACH WORD void count(char c[]); void main() {           char a[50];           int i=0;           clrscr();


#an array that accept input and gives an output

write a program that declares and initializes 2 integer variable a and b with the value 35 and 14, and displays and calculates their sum,product,quotient and real division result.t

one of the segments is showing compilation error...

Project Description: I have a code that works different on 64 bit and 32 bit system. Code is relative to some crypt functions, similar, but not equal to: I have to move fr

# include stdio.h> # include conio.h> # include string.h> void main()   {           int i=0,j=0;           char a[100],temp;           clrscr();