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 are the two types of comments?

0 Answers  


the maximum length of a character constant can be a) 2 b) 1 c) 8

0 Answers  


What is operator overloading in c++ example?

0 Answers  


what is oops and list its features in c++?

0 Answers  


What is the operator in c++?

0 Answers  






Explain differences between new() and delete()?

0 Answers  


What size is allocated to the union variable?

0 Answers  


what are prototypes

4 Answers   Infosys, TCS,


What is the exit function in c++?

0 Answers  


What are the advantages of C++ programming compared to C programming?

2 Answers   HAL,


What is your strongest programming language (Java, ASP, C, C++, VB, HTML,C#, etc.)?

24 Answers   Infosys, Microsoft, TCS,


Which function cannot be overloaded c++?

0 Answers  


Categories