Explain what data encapsulation is in c++?
No Answer is Posted For this Question
Be the First to Post Answer
Adobe Interview & Adobe Placement Paper
What is c++ & why it is used?
What are member functions used in c++?
What can c++ be used for?
throw Can constructors exceptions?
Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.
What is meant by entry controlled loop? What all C++ loops are exit controlled?
How do you generate a random number in c++?
What is the handle class?
write the code that display the format just like 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 6 5 4 3 2 1
what is the use of templates?
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?