Search

Assembly program in C || C Programs

Code -

#include<stdio.h> 
void main() {  
 int a = 10, b = 20, c;  
 
   asm {  
      mov ax,a  
      mov bx,b  
      add ax,bx  
      mov c,ax  
   }  
 
   printf("c= %d",c);  
}  

Output -

c= 30
1 view0 comments

Related Posts

See All

Program of Random Number in C || C Programs

Code - #include <stdio.h> #include <conio.h> #include <stdlib.h> void main() { // use rand() function to generate the number printf (" The random number is: %d", rand()); pri

Getchar() function in C || C Programs

Code - #include <stdio.h> #include <conio.h> void main() { char c; printf ("\n Enter a character \n"); c = getchar(); // get a single character printf(" You have passed ")

  • 1024px-Telegram_logo.svg
  • download
  • YouTube