Should a constructor be public or private?
No Answer is Posted For this Question
Be the First to Post Answer
What is class invariant in c++?
What do you mean by translation unit in c++?
Write a function to find the nth item from the end of a linked list in a single pass.
Are c and c++ similar?
What do you mean by call by value and call by reference?
What do you mean by ‘void’ return type?
Which one is a preferred language C or C++? Why?
When should I use unitbuf flag?
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 is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
Explain 'this' pointer and what would happen if a pointer is deleted twice?
What is the use of endl in c++?