C Program: Square of Integers from 0 to 9 Using Functions

#include <stdio.h>

// Function to return the square of a number
int square(int i) {
return i * i;
}

int main() {
for (int i = 0; i < 10; i++) {
printf(“Square of %d is %d\n”, i, square(i));
}
return 0;
}

Converting square() Function to ARM Assembly

Leave a Reply

Your email address will not be published. Required fields are marked *