What is the use of pointer in c++ with example?
No Answer is Posted For this Question
Be the First to Post Answer
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?
given the code segment below void main() { cout<<"my no. is"; } question is how can we get the output hai aravind my no. is 99999999999 without editig the main().
How many standards of c++ are there?
what is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?
What is null and void pointer?
Discuss the possibilities related to the termination of a program before entering the mainq method?
Describe run-time type identification?
What is setbase c++?
What is abstract class in c++?
Refer to a name of class or function that is defined within a namespace?
Explain binary search.
What is virtual destructor ans explain its use?