I am now clear that we can save memory by dynamic allocation of memory by the example of array declaration.
I would like to know more about 'vector' data type .
Can you please send me a link or suggest any source to get more knowledge on C++.
I also doubt one more yhing that while declaring a pointer we allocate a memory location i.e we allocate the same amount of memory as the one to which yhe pointer points .
So this means that we initially allocate memory for the pointer then again go for dynamic declaration of another variable...
Can anyone help me understand the basic use of pointers.
I am aware of pointers,yet I feel that a program can be made more
easier without using a pointer.
My basic dout is that can pointers be used to save memory by dynamic declaration of variables.
I thought over it but found that using...
how about finding reverse of a no by this logic and comparing it to the orignal one
int sum,a,b;
sum=0;
cin>>a;
b=a;
while(a!=0)
{
sum=(sum*10)+(a%10);
a=a/10;
}
if(sum==b)
cout<<"palindrome";
The answer is n+1 times
The hint lies in the fact
The nth differential of f(X)=x^n gives a constant
And n+1th diffrential i.e of a constant gives us Zero