fork download
  1. #include <stdio.h>
  2.  
  3. unsigned rightrot2(unsigned x, int n){
  4. __asm{
  5. mov ebx, x
  6. mov cl, n
  7. ror ebx, cl
  8. mov x, ebx
  9. };
  10. return x;
  11. }
  12.  
  13. int main(void) {
  14. // your code goes here
  15. return 0;
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function 'rightrot2':
prog.c:4:7: error: expected '(' before '{' token
  __asm{
       ^
prog.c:5:3: error: unknown type name 'mov'
   mov ebx, x
   ^
prog.c:6:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mov'
   mov cl, n
   ^
prog.c:5:7: warning: unused variable 'ebx' [-Wunused-variable]
   mov ebx, x
       ^
prog.c:13:5: warning: 'main' is normally a non-static function [-Wmain]
 int main(void) {
     ^
prog.c:16:1: error: expected declaration or statement at end of input
 }
 ^
stdout
Standard output is empty