#include <iostream>
using namespace std;
struct wow {
int x;
};
int main() {
wow a;
wow *b;
a.x = 22;
b = &a;
a.x = 23;
cout << b->x;
return 0;
}



#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; wow..

Answer / tiger

23

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More OOPS Interview Questions

Write pseudo code for push in a stack?

2 Answers   emc2,


What is a class and object?

0 Answers  


Why do we use inheritance?

0 Answers  


What is difference between new and malloc?

7 Answers   emc2,


When you define a integer it gets stored in which data structure?(Stack or a heap)

2 Answers   emc2,






write a C++ program for booking using constructor and destructor.

0 Answers   HAL,


What are classes oop?

0 Answers  


What are the main differences between procedure oriented languages and object oriented languages?

9 Answers   IBM, Infosys, Wipro,


What are the 4 pillars of oop?

0 Answers  


Base class has two public data members. How can i derive a new class with one datamember as public and another data member as private?.

2 Answers  


Define a class to represent a bank account. Include the following members: Data Members: Name of the Depositor Account Number Type of Account Balance amount in the account Member Functions: To assign the initial values. To deposit an account. To withdraw an amount after checking the balance. Write a C++ main program to display account number, name and balance.

6 Answers  


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

0 Answers   SRA,


Categories