#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

In multiple inheritance , to create sub class object , is there need to create objects for its superclasses??? in java and c++ both. Actually i have some information that is , all available members from its superclasses , memory created in subclass obj , so no need to create object for its superclasses...??? Thanks in Advance

1 Answers  


How do you define a class in oop?

0 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  


why reinterpret cast is considered dangerous?

0 Answers   TCS,


If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?

0 Answers  






features of OOPS

22 Answers   Ness Technologies, Satyam,


all about pointers

2 Answers  


What do you mean by multiple inheritance and multilevel inheritance? Differentiate between them.

2 Answers  


WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP

2 Answers  


Where is pseudocode used?

0 Answers  


Write a program to find out the number of palindromes in a sentence.

1 Answers   TCS,


What is difference between #define and const?

3 Answers   emc2,


Categories