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

A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.

0 Answers  


Which is best ide for c++?

0 Answers  


How do I run c++?

0 Answers  


How do you link a C++ program to C functions?

4 Answers  


Why #include is used?

0 Answers  






What are virtual functions and what is its use?

1 Answers  


How many types of comments are there in c++?

0 Answers  


How much is c++ certification?

0 Answers  


Explain the difference between struct and class in terms of access modifier.

0 Answers  


What is the use of register keyword with the variables?

0 Answers  


What is a container class?

0 Answers  


Why do we use iterators?

0 Answers  


Categories