Changes

Jump to: navigation, search

Assignment 1: Q & A

704 bytes removed, 00:26, 24 September 2012
Q & A
'''A:''' Yes ncurses library in linux can capture events from mouse but in some environments, xterm is used under the X window system. <br>
'''Submitted by:''' Shajinth Pathmakulaseelan and Auquib Rasul, Team 2 <br><br>
 
'''Q:''' Is this syntax for pointer casting and dereferencing *(int*)p for void* p equivalent to (*(int*)p)?
<br>
'''A:''' Yes, however the latter is generally more accepted due to readability.
<br>'''Submitted by:''' Team 6 <br><br>
 
'''Q:''' Why can't void* variables be dereferenced?
'''A:''' The pointer can't be dereferenced, because the compiler will not know how much of the memory is devoted to that particular value. For example if one has 8 bytes in memory with values in it, they are interpreted differently as int (2x 4 byte ints) and double (1x 8byte double). Without a data type the value cannot be determined therefore casting must be done first.
<br>'''Submitted by:''' Team 6 <br><br>
== Bug Reports ==

Navigation menu