Explain differences between alloc() and free()?
No Answer is Posted For this Question
Be the First to Post Answer
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?
What are the benefits of operator overloading?
i want the NIC programmer-B model papaer pattren, iwant the all model papers?
Describe new operator?
Define a way other than using the keyword inline to make a function inline?
Which is most difficult programming language?
Difference between a copy constructor and an assignment operator.
How are the features of c++ different from c?
What is encapsulation in c++?
What is a mutable member?
What does the nocreate and noreplace flag ensure when they are used for opening a file?
How is memory managed in C++?