C Programming
- Print integer
- Add & subtract
- Odd & even
- Multiply & divide
- Check vowels
- Letter grade program
- Leap year program
- Sum of digits
- Prime numbers
- Sum of numbers
- Find factorial
- Fibonacci series
- Fibonacci triangle
- Number triangle
- Alphabet triangle
- Armstrong numbers
- Palindrome numbers
- Swap number
- Reverse number
- Decimal to binary
- Assembly code in C
- Matrix multiplication
- HCF & LCM
- nCr & nPr
- Print pattern
- Floyd’s triangle
- Pascal triangle
- Count digits
- Strong numbers
- Perfect numbers
- Sum of natural number
- Binary to decimal
- Decimal to octal
- Octal to decimal
- Binary to octal
- Octal to binary
- Add using pointer
- Bubble sort
- Insertion sort
- Selection sort
- Quick sort
- Binary search
- Linear search
- Largest element of array
- Smallest element of array
- Reverse Array
- Variable size & limit
- ASCII value of character
- Sum of array elements
- Number of element in array
- Merge two array
- Insert element in array
- Delete element from array
- Add two matrix
- Transpose matrix
- Print string
- Reverse string
- Delete vowels
- Sort string
- Remove spaces
- Swap string
- Random numbers
- Print date & time
- Print IP address
- Shut down computer
Using assembly code in C language
We can also write assembly code in C language. To execute some assembly code inside C language we have to write all the assembly code inside asm{} block. Here we will write a program using assembly code inside the C code.
Here we use TurobC to execute this program. Let’s see the program using assembly code with C programming language.
// Using assembly code with C
#include<stdio.h>
void main(){
int a = 5, b = 10, c;
asm{
mov ax,a
mov bx,b
add ax,bx
mov c,ax
}
printf("Value of c is = %d", c);
}
Output of this assembly code program:
Value of c is = 15
Previous page: Decimal to binary by C
Next page: Matrix multiplication by C