Hi i need to Acess a variable "int Intval" in the below
mentioned code .How to Access it guys i am waiting for your
reply

Answers were Sorted based on User's Feedback



Hi i need to Acess a variable "int Intval" in the below mentioned code .How to Access it..

Answer / vic

Write a getter method?

int val::getVal() {
return intval;
}

Is This Answer Correct ?    1 Yes 0 No

Hi i need to Acess a variable "int Intval" in the below mentioned code .How to Access it..

Answer / saikat ganguly

class val
{
int intval

public :
void func ()
{
print("\n Enter the value of intval);
scanf("%d",&intval);
}
};

void main()
{
val p
p.func();
getch();
}

Is This Answer Correct ?    0 Yes 0 No

Hi i need to Acess a variable "int Intval" in the below mentioned code .How to Access it..

Answer / ved prakash

using System;
class ved
{
public static void Main()
{
int x,y,z;
x=3;
y=6;
z=0;
z=x+y;
Console.WriteLine(z);
Console.ReadLine();

}
}

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C++ General Interview Questions

What is virtual function? Explain with an example

0 Answers  


How does the copy constructor differ from the assignment operator (=)?

0 Answers  


What do you know about friend class and friend function?

1 Answers  


What do you mean by stack unwinding in c++?

0 Answers  


What is null and void pointer?

0 Answers  






What is the difference between "overloading" and "overridding"?

3 Answers  


What is polymorphism & list its types in c++?

0 Answers  


How many ways can a variable be initialized into in C++?

0 Answers   HCL,


What is difference between initialization and assignment?

12 Answers   HCL, HP, Infosys,


What is vector string in c++?

0 Answers  


Can the creation of operator** is allowed to perform the to-the-power-of operations?

0 Answers  


What is flag in computer?

0 Answers  


Categories