sansiri.r


{ City } palayamkottai
< Country > india
* Profession *
User No # 106652
Total Questions Posted # 0
Total Answers Posted # 4

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

Users Marked my Answers as Correct # 1
Users Marked my Answers as Wrong # 1
Questions / { sansiri.r }
Questions Answers Category Views Company eMail




Answers / { sansiri.r }

Question { CTS, 67512 }

void main()
{
for(int i=0;i<5;i++);
printf("%d",i);
}

What is the output?..


Answer

the answer is...........0




because in c,c++ program when the semicolon is present then it is considered as one statement
here for loop has a semicolon so it consider one statement and execute only one so that the initial value o is printed

Is This Answer Correct ?    0 Yes 1 No

Question { HCL, 8773 }

void main()
{
int i=7;
printf("N= %*d",i,i);
}


Answer

N= 7




it doesnot consider the * symbol and the other i.

Is This Answer Correct ?    0 Yes 0 No


Question { Wipro, 6373 }

what is exceptions?


Answer

sometimes difficult stage to get the correct answer for any program in this case the exception is used to solve the case
eg:: divide by 0
overflow of array size

Is This Answer Correct ?    0 Yes 0 No

Question { TCS, 6759 }

What is the out put of this programme?
int a,b,c,d;

printf("Enter Number!\n");
scanf("%d",&a);
while(a=!0)

{
printf("Enter numbers/n");
scanf("%d%d%d",&b,&c,&d);
a=a*b*c*d;

}
printf("thanks!");

getche();

Entering numbers are
a=1,b=2,c=3,d=4
b=3,c=4,d=-5
b=3,c=4,d=0


Answer

Enter Number!
1
Enter numbers
2 3 4
Enter numbers
3 4 -5
Enter numbers
3 4 0
thanks!

Is This Answer Correct ?    1 Yes 0 No