
Practice Memory Management –
What would be the output of the following?
#include
void main()
{
char *ptr=“abcd”
char ch;
ch = ++*ptr++;
cout<
}
What will be the output of the following program?

Practice Memory Management –
What will be the output of the following program?
#include
int main() {
int x = 10, y = 20;
int *ptr = &x;
int &ref = y;
*ptr++;
ref++;
cout<< x << " " << y;
return 0;
}
What will be the output of following program?

Practice Memory Management –
What will be the output of following program?
#include
void main()
{
float x;
x=(float)9/2;
cout<
}

Practice Memory Management –
What is the output of following program?
#include
using namespace std;
class A
{
private:
int x;
public:
A(int _x) { x = _x; }
int get() { return x; }
};
class B
{
static A a;
public:
static int get()
{ return a.get(); }
};
int main(void)
{
B b;
cout << b.get();
return 0;
}