Schedule
Labs
Assignments
TA office hours
Topic videos
Some course notes
Extra problems
Lecture recordings
If x and y are variables of type int, the easiest way to copy y to x is with the assignment statement:
x = y;It's also possible to write
memcpy(&x, &y, sizeof(int));but this is unnecessarily complex and error-prone.
If x and y are variables of type double, the easiest way to copy y to x is with the assignment statement:
x = y;It's also possible to use memcpy(), but this is unnecessarily complex and error-prone.
If x and y are variables of type struct dirent, the easiest way to copy y to x is with the assignment statement:
x = y;It's also possible to use memcpy(), but this is unnecessarily complex and error-prone.