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
Answer / vic
Write a getter method?
int val::getVal() {
return intval;
}
Is This Answer Correct ? | 1 Yes | 0 No |
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 |
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 |
What are the two types of comments?
the maximum length of a character constant can be a) 2 b) 1 c) 8
What is operator overloading in c++ example?
what is oops and list its features in c++?
What is the operator in c++?
Explain differences between new() and delete()?
What size is allocated to the union variable?
what are prototypes
What is the exit function in c++?
What are the advantages of C++ programming compared to C programming?
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++?