what is the error in the following code:
main()
{
int i=400,j;
j=(i*i)/i;
}
Answers were Sorted based on User's Feedback
Answer / erohitverma
it is not having return statement
main()
{
int i=400,j;
j=(i*i)/i;
return 0;
}
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / srinivas
main fun dont have void so it should return int vale and j=
(i*i)/i here frist it will multiply so 400*400 it is out of
int range so it will take garbage value but it wont show
error for this reason but it will give one garbage value .
bcz we didnt write the return stmt so it will show error....
Is This Answer Correct ? | 3 Yes | 1 No |
UINT i,j; i = j = 0; i = ( i++ > ++j ) ? i++ : i--; explain pls....
main() { char c; for(c='A';c<='Z';c++) getch(); }
wap for bubble sort
what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }
what is the large sustained error signal that eventually cause the controller output to drive to its limit
Find the error (2.5*2=5) (a) X=y=z=0.5,2.0-5.75 (b) s=15;
loop1: { x=i<n?(i++):0; printf("%d",i); exit(x); continue; } Error- misplaced continue. Doubt-1.will the exit(x) be executed for all values of x 2.will this statement go out of the program.
class test { int a; public: test(int b):a(b){} void show(){ cout<<a; } }; void main() { test t1; test t2(5); t1.show(); t2.show(); } }
To generate the series 1+3+5+7+... using C program
void main() { int i=7; printf("N= %*d",i,i); }
void main() { int i=1; printf("%d%d%d",i,++i,i++); } Cau u say the output....?
Given an int variable n that has already been declared and initialized to a positive value, and another int variable j that has already been declared, use a do...while loop to print a single line consisting of n asterisks. Thus if n contains 5, five asterisks will be printed. Use no variables other than n and j .