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 a dynamic binding in c++?

0 Answers  


What is the role of copy constructor in copying of thrown objects?

0 Answers  


Why do we use iterators?

0 Answers  


Incase of a function declaration, what is extern means?

0 Answers  


Explain what is polymorphism in c++?

0 Answers  






What are the differences between public, private, and protected access?

12 Answers   IBM, Oracle, Wipro,


What is a down cast?

0 Answers  


Describe the advantages of operator overloading?

0 Answers  


Why are pointers not used in c++?

0 Answers  


What's the "software peter principle”?

0 Answers  


How do you save a c++ program?

0 Answers  


what is the size of a class which contains no member variables but has two objects??? is it 1 or 2??

4 Answers  


Categories