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 Object Oriented programming.what is the difference between C++ and C?

8 Answers   Infosys,


What is type of 'this' pointer?

0 Answers  


Explain the concept of memory leak?

0 Answers  


What do you mean by ‘void’ return type?

0 Answers  


how many trys can we write in one class

3 Answers   Cap Gemini,


What is c++ array?

0 Answers  


Difference between static global and global?

16 Answers   Microsoft, Symphony, Wipro,


what does the following statement mean? int (*a)[4]

0 Answers  


What are the classes in c++?

0 Answers  


Write is a binary search tree? Write an algo and tell complexity?

0 Answers   Axtria,


Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..

0 Answers  


How Virtual functions call up is maintained?

2 Answers  


Categories