vikramanpadu


{ City } erode-chennai
< Country > india
* Profession * mca-student
User No # 7211
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 # 11
Users Marked my Answers as Wrong # 5
Questions / { vikramanpadu }
Questions Answers Category Views Company eMail




Answers / { vikramanpadu }

Question { HCL, 20036 }

int i =10
main()
{
int i =20,n;
for(n=0;n<=i;)
{
int i=10
i++;
}
printf("%d", i);


Answer

int i=10[;]
main()
{
int i=20,n;
for(n=0;n<=i;)
{
int i=10[;]
i++;
}
printf("%d", i);
The syntax errs r specified in sq.braces..
if its corrected there s no terminating condition also..
so no o/p..

Is This Answer Correct ?    8 Yes 0 No

Question { Ramco, 10828 }

main()
{
int a=0;
if(a=0) printf("Ramco Systems\n");
printf("India\n");
}
output?


Answer

Actually compile time err wil occur..
Its "Possibly incorrect assignment"
Its due to if(a=0)??
Its wrong,we have to compare only while checking
conditions..
we have to use the operators which are used to check
conditions like ==,<=,>=....

Is This Answer Correct ?    1 Yes 5 No


Question { Oracle, 7774 }

Go through the following code sinippet
char a[20];
a="Hello Orcale Test";
will this compile?


Answer

Compile time err wil occur;
We can use *a="Hello Orcale Test" or a[20]="Hello Orcale
Test";
It will lead the prg nice.

Is This Answer Correct ?    2 Yes 0 No