What is the object serialization?
If there are 1 to 100 Numbers in array of 101 elements. Which is the easy way to find repeated number?
Write an algorithm that determines whether or not an almost complete binary tree is a heap.
What is the output of the following program? Why?
Why do we need c++?
Explain the difference between c & c++?
Which uses less memory? a) struct astruct { int x; float y; int v; }; b) union aunion { int x; float v; }; c) char array[10];
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?
When is the copy constructor called?
How do you define/declare constants in c++?
What is endl?
Explain the difference between overloading and overriding?
Can we make any program in c++ without using any header file and what is the shortest program in c++.