Jump to: navigation, search

Workshop 2

381 bytes added, 08:41, 20 September 2013
no edit summary
'''A:''' I was trying to do this with a case for each data type, but we're supposed to cast the void* pointers as char*, and then swap the values byte-by-byte.<br>
'''Submitted by:''' Kevin Kofler, Team 9<br><br>
'''Q:''' How to determine the size of a structure?<br />
'''A:''' Same as primitive types, use sizeof().<br />
BUT - if there are pointers pointing to, say, strings, sizeof() will only count the sizes of these pointers (which is platform dependent, 4 bytes/pointer on Matrix). The actual size of these strings won't be counted. <br />
'''Submitted by:''' Yiqi, Team 5<br /><br />

Navigation menu