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 |
#include"stdio.h" #include"conio.h" void main() { int a; printf("\n enter a number:"); scanf("%c\n"); getch(); }
I can not get my C++ program to work right. It is supposed to tell if a word is a palindrome or not, but it only tells thet the word is not a palindrome. And I can't fix it.
how to convert decimal to binary in c using while loop without using array
50 Answers Apple, Aptech, Arwen Tech, BCS, C2D Software, CEC,
To generate the series 1+3+5+7+... using C program
What is probability to guarantee that the task a programmer is going to create will be created and be able to run on a particular system (RTOS/GPOS).
what are the techniques for reducing the fragility of a memory bug?
UINT i,j; i = j = 0; i = ( i++ > ++j ) ? i++ : i--; explain pls....
what is macro in c? Difference between single linked list & double linked list what is fifo & lifo? what is stack & queue?
A sample program using data structure? what is file handling?
#include<>stdio.h> #include<>conio.h> { printf("hello"); void main() getch(); } what the out put of this program and why ......plz clear my answer
void main() { int i=1; printf("%d%d%d",i,++i,i++); } Cau u say the output....?
What is the code for following o/p * * * * * * * * * * * * * * * *