i write
void main()
{
int j;
j - = 0;
printf("%d",y);
}
& i got the answer as 842. i tried it on various computers but the
answer is same. pls help me
how is this answer is?
That code doesn't even compile, and it's almost certainly *not* the
code that you actually tried. Are you expecting us to guess what your
real program looks like?
Copy and paste the *exact* code that you actually compiled.
main() returns int, not void. Change "void main()" to "int main(void)".
"j - = 0;" is a syntax error. I won't try to guess what you actually
meant.
You try to print the value of y, but you never declared it.
Since you use printf() you need to add "#include <stdio.h>" to the top
of your program.
Since main returns an int, you should return an int: add "return 0;"
after the printf call. (This isn't always required, but it's always a
good idea.)