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 |
I am using Qt 5.6 during compilation it stops and gives error about Qmake The process "C:QtQt5.6.35.6.3msvc2015_64inqmake.exe" crashed. Error while building/deploying project untitled1 (kit: Desktop Qt 5.6.3 MSVC2015 64bit) When executing step "qmake"
how to convert decimal to hexadecimal without using arrays just loops
WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf("%d%d%d",x,y,z); }
how tally is useful?
what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }
How to develop a program using C language to convert 8-bit binary values to decimals. TQ
Write a program to accept two strings of Odd lengths. Then take all odd characters from one string and even characters from the other and concatenate and produce a string.
To generate the series 1+3+5+7+... using C program
quoroum of computer languages?
what is macro in c? Difference between single linked list & double linked list what is fifo & lifo? what is stack & queue?
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 .
write the value of x and y after execution of the statements: int x=19,y; y=x++ + ++x; x++; y++;