shahbaz


{ City } lahore
< Country > pakistan
* Profession * software engineer
User No # 57385
Total Questions Posted # 0
Total Answers Posted # 3

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 12
Users Marked my Answers as Wrong # 5
Questions / { shahbaz }
Questions Answers Category Views Company eMail




Answers / { shahbaz }

Question { TCS, 26681 }

write a program for even numbers?


Answer

void main()
{
int a,b;
cout<<"Enter number to check is it Even or Odd";
cin>>a;
if(a>=0)
{
if(a%2==0)
{
cout<<"The number is Even ";
}
else
{
cout<<"Number is Odd ";
}
}
else
{
Cout<<"Number is Lesser than Zero 0";;
}
getch();
}

Is This Answer Correct ?    7 Yes 1 No

Question { CSC, 10716 }

what is mean by overriding in which situation we wil use?


Answer

According to J2ee Compleet reference java:
I Think the answer is that
Overriding means the : In inheritance If we Declare the
(Public of default) Method in the superclass Similarly we
declare the method with the same name ,Same type,same
number of parameters.but the Body of the method May
different When We Instansiate child class and access it
then child's method will called if u want to call super's
overriden method then use the [super()] method to access it
in child for this read [Java compleete reference's
Chapter#8] u will find reasonable answer

Is This Answer Correct ?    3 Yes 2 No


Question { Persistent, 13390 }

How much is size of struct having 1 char & 1 integer?


Answer

as the size of char in C++ and C is one byte and the size of
int in C++,c is 2 byte so when we illl call that struct then
the memory will assigned the contents of these char and
int's variables
But
Char in C# and java is of 16 bit and in is of 32 bits and
double of 64 bits so the size of struct is depends upon
these languages.

Is This Answer Correct ?    2 Yes 2 No