Programming Languages C Objective
Mar 08, 2013

What will be output of the following c code?

void main()
 {
  asm{
  mov bx,8;
  mov cx,10
  add bx,cx;
 }
  printf("%d",_BX);
 }

Choose the correct answer:
B) 18
C) 10
D) Compiler error
Detailed Explanation

asm keyword is used to write assembly language program in c. mov command stores the constants in the register bx, cx etc. add command stores the content of register and stores in first register i.e. in bx.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback