07-25-2023, 01:28 PM
The C standard library provides many built-in functions to perform various operations.
#include <stdio.h>
#include <string.h>
int main() {
// String manipulation functions
char str1[] = "Hello";
char str2[10];
strcpy(str2, str1); // Copy str1 to str2
printf("%s\n", str2); // Output: Hello
// Mathematical functions
double result = sqrt(25);
printf("Square root of 25: %.2f\n", result); // Output: 5.00
return 0;
}
#include <stdio.h>
#include <string.h>
int main() {
// String manipulation functions
char str1[] = "Hello";
char str2[10];
strcpy(str2, str1); // Copy str1 to str2
printf("%s\n", str2); // Output: Hello
// Mathematical functions
double result = sqrt(25);
printf("Square root of 25: %.2f\n", result); // Output: 5.00
return 0;
}
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos