Answer:
the answer is d have a nice day
Explanation: i got a 100
Answer:
Following are statement is given below
int k=1,total=0; // variable declaration
while(k<50) // iterating the while loop
{
total=total+k*k;// calculating the square
k=k+1; // increments the value of k by 1
}
Explanation:
Following are the description of Statement.
- Declared a variable "total" and "k" of the "integer " type initialized the total to 0 and "k" to 1.
- Iterating the while loop for less then 50 .In this loop, we calculating the sum of square of first 50 number in the "total" variable .
- After that increment the value of "k" variable by 1 to execute the loop less then 50 .
Answer:
The C's malloc and free functions and the C++'s new and delete operators execute similar operations but in different ways and return results.
Explanation:
- The new and delete operators return a fully typed pointer while the malloc and free functions return a void pointer.
-The new and delete operators do not return a null value on failure but the malloc/free functions do.
- The new/delete operator memory is allocated from free store while the malloc/free functions allocate from heap.
- The new/delete operators can add a new memory allocator to help with low memory but the malloc/free functions can't.
- The compiler calculates the size of the new/delete operator array while the malloc/free functions manually calculate array size as specified.