How does class accomplish data hiding in c++?
No Answer is Posted For this Question
Be the First to Post Answer
How do you define a class in c++?
Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].
Write an algorithm that determines whether or not an almost complete binary tree is a heap.
What is c++ hash?
Why namespace is used in c++?
Does defining a function inline mean that it wont push and pop things on/off the stack ...like parameters and the return the address??
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?
Is c++ a programming language?
is throwing exception from a constructor not a good practice ?
What is format for defining a structure?
How is an Abstract Base Class(ABC) related to an "Abstract Data Type" (ADT)
Write about a nested class and mention its use?