Can we delete this pointer in c++?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

what is data Abstraction

2 Answers  


1)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea += sizeof(int); } return 0; } 2)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea ++; } return 0; } The output of this two programs will be different why?

5 Answers  


what do you mean by volatile variable?

0 Answers  


List out some of the object-oriented methodologies?

1 Answers  


Name four predefined macros.

0 Answers  






Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?

0 Answers  


Do we have private destructors?

12 Answers   Symphony, TCS,


what is a class? Explain with an example.

0 Answers  


Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

0 Answers  


Write about the members that a derived class can add?

0 Answers  


What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random

0 Answers  


What are the various storage classes in C++?

0 Answers   Fidelity,


Categories