A bit more silly extra credit for ex12

This commit is contained in:
Dan Buch 2024-04-18 19:45:38 -04:00
parent df5d4f5a1f
commit 58e734c60f
Signed by: meatballhat
GPG Key ID: A12F782281063434

View File

@ -3,12 +3,16 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int areas[] = { 10, 12, 13, 14, 20 }; int areas[] = { 10, 12, 13, 14, 20 };
areas[0] = 100;
char name[] = "Zed"; char name[] = "Zed";
name[2] = 'F';
char full_name[] = { char full_name[] = {
'Z', 'e', 'd', 'Z', 'e', 'd',
' ', 'A', '.', ' ', ' ', 'A', '.', ' ',
'S', 'h', 'a', 'w', '\0', 'S', 'h', 'a', 'w', '\0',
}; };
full_name[9] = 'x';
areas[1] = name[1];
// WARNING: On some systems you may have to change the // WARNING: On some systems you may have to change the
// %ld in this code to a %u since it will use unsigned ints // %ld in this code to a %u since it will use unsigned ints