What is double in c++?
No Answer is Posted For this Question
Be the First to Post Answer
Do we have private destructors?
which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
What is a constructor in c++ with example?
Explain what are mutator methods in c++?
What can I safely assume about the initial values of variables which are not explicitly initialized?
What are the debugging methods you use when came across a problem?
Explain the difference between abstract class and interface in c++?
What is the benefit of encapsulation?
Where must the declaration of a friend function appear?
Why for local variables the memory required to hold the variable is allocated from the program stack and for new its allocated from the heap?
What are the uses of pointers?
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?