Top

Discussion

What is the output of this C code?

int main()
{
int var = 010;
printf("%d", var);
}

 

  • A.2
  • B.8
  • C.9
  • D.10

Answer: B

010 is octal representation of 8.

No comment is present. Be the first to comment.
Loading…

Post your comment