anvesh


{ City } vijayawada
< Country > india
* Profession *
User No # 17709
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 # 56
Users Marked my Answers as Wrong # 58
Questions / { anvesh }
Questions Answers Category Views Company eMail




Answers / { anvesh }

Question { Caritor, 6587 }

what is the code for getting the output as
*
**
***


Answer

main()
{
printf("*\n**\n***);
}
OR
main()
{
int n,i;
while(n<3)
{
i=0;
while(i<=n)
{printf("*");i++;}
printf("\n); n++;
}

Is This Answer Correct ?    4 Yes 3 No

Question { Google, 41443 }

If 4 digits number is input through the keyboard, Write a
program to calculate sum of its 1st & 4th digit.


Answer

#include
main()
{
int n,n1,n4;
printf("Enter 4 digit number:");
scanf("%d",&n);
n4=n%10;
n1=n/100;
printf("\nResult=",(n1+n4));
getch();
}


Is This Answer Correct ?    52 Yes 55 No


Question { Honeywell, 6534 }

what is out put of the following code?
#include
class Base
{
Base()
{
cout<<"constructor base";
}
~Base()
{
cout<<"destructor base";
}
}
class Derived:public Base
{
Derived()
{
cout<<"constructor derived";
}
~Derived()
{
cout<<"destructor derived";
}
}
void main()
{
Base *var=new Derived();
delete var;
}


Answer

there is no include file iostream for cout
immproper ending for classes ';'

Is This Answer Correct ?    0 Yes 0 No