venkata rama krishna


{ City } hyderabad
< Country > india
* Profession * software engg
User No # 8577
Total Questions Posted # 0
Total Answers Posted # 7

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 20
Users Marked my Answers as Wrong # 6
Questions / { venkata rama krishna }
Questions Answers Category Views Company eMail




Answers / { venkata rama krishna }

Question { CA, 8509 }

How a dll will be sharable by more than one exe?


Answer

If a dll is Sharable, all the functions are set in global
data segment, when ever a exe is called the SCM (Service
control Manager ) will increment reference count by 1, if
the second exe is called the same dll, SCM will increment
by 2, if first exe is unloaded or terminatred it decrements
the count by 1.

And finally if reference count is 0, the dll will unloaded
from the memory.

Is This Answer Correct ?    0 Yes 0 No

Question { TCS, 4869 }

how i can design a user interface in vc++ for getting
inputs from users


Answer

While Creating the user interface all the functions should
be public, and all the fuctions are pure virtual functions.

Here is the example code

#define interface struct

interface
{
virtual int add(int x, int y) =0;
};

class A : public <>
{
public:
.
.

int add (int x, int y);
};

int A:: add(int x, int y)
{
return x+y;
}

Is This Answer Correct ?    3 Yes 3 No


Question { Microsoft, 16321 }

If i derive a new class from CObject what are the basic
features my derived wil get ?


Answer

1. CObjct does support run time VTable.
because it should support IUnknown Interface.
2. The derived base class should not contain early binding
VTbale.
3. Should no over ride the CObject functions.
4. no pure virtual functions should not be declared.

A part from this CObject support RTTI, Debuging,
Serialization and Dump functionalites

Is This Answer Correct ?    2 Yes 0 No

Question { CTS, 3473 }

a class that maintains a pointer to an object that is
programatically accessible through the public interface is
known as?


Answer

It is nothing but a Smart pointer.

Is This Answer Correct ?    1 Yes 0 No

Question { 4194 }

write a program that takes 5 digit no and calculate 2 power
that no and print it.


Answer

#include

void main()
{
int b = 0;
int num5digit;
cin>>num5digit;
b = 1<< num5digit;
cout<<"b = "< }

Is This Answer Correct ?    0 Yes 0 No

Question { TCS, 6945 }

Difference between Constructors and static constructors?


Answer

The main thing is the constructoe can't be Static, int or
any other data type. It will simpley throws a error
messgae. It is just to confuse the candidate.

Example:
class A
{
public:
static A(){ a = 0;}
int a;
};

void main()
{
A a;
}

Is This Answer Correct ?    2 Yes 0 No

Question { 11358 }

How you create a button dynamically?


Answer

1. Create a Object from CButton control. CButton m_ctlButton
2.
m_ctlButton.Create("OK",ES_CHILD|ES_VISIBLE,CRect(0,0,100,100),CWnd*
pParentWnd,MB_OK);

with this we can create the button by dynamically.

Is This Answer Correct ?    12 Yes 3 No