Tuesday 1 January 2008

asm keyword in c programming language



asm keyword in c programming language



Keyword asm is used to write
assembly language code in c programming.



(1) What will be output of
following c program?



#include

int main(){



asm{

         mov ax,10;

         shl,2;

    }



printf("%d",_AX);

return 0;

}



Output: 40

Explanation: ax and bx is general
purpose register. Statement mov ax, 61 means value 61 is storing

No comments:

Post a Comment