What is the size of an empty class?
Latest Answer: class A{}most of time sizeof(A) = 1, however, it is a small integer regarding to the complier. ...
How to reverse a linked list using only one pointer?
Latest Answer: void revshow(){struct node *p;int temp[100],count=0,i;p=head;for(i=0;p!=NULL;i++,p=p->next)temp[i]=p->num;for(i=i-1,p=head;p!=NULL;i--,p=p->next)p->num=temp[i];} ...
What is the Default Constructor?
Latest Answer: A default constructor is a type of constructor which does not have any arguments/parameters.Thus it is executed as the object is created. ...
What is the disadvantage of using too many templates?
When is a destructor executed?
Latest Answer: It is called automatically whenever life of object ended. we need not to call it separtely. ...
Is it possible to create an interface in C++? If Yes, how?
you are tasked by your teacher to help her in the computation of your grade for preliminary period. the grade will computed based on the following formula.CRA=summation of all the quizzes, recitation,board
How are objects passed in CPP?
Latest Answer: Let us understand through the following code snippet#include#include#include#define BLOCKSIZE 20;int main(){char *ptr;ptr=(char *)malloc(BLOCKSIZE);if(ptr!=NULL)strcpy(ptr,"mohin khan");printf("content=%s",ptr);printf("naddress=%u",ptr);free(ptr);printf("nAfter ...
What is auto pointer ? What is the use of this ?
Latest Answer: Auto pointer is nothing but, Proper memory management ( memory Allocation and deallocation).In C++ there is class template "auto_ptr" this is good example for auto pointer. Only we need to allocate a memory using the "auto_ptr" class ...
View page [1] 2 3 4 5 Next >>

Go Top