📄 page_1035.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>page_1035</title> <link rel="stylesheet" href="reset.css" type="text/css" media="all"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <table summary="top nav" border="0" width="100%"> <tr> <td align="left" width="30%" style="background: #EEF3E2"><a style="color: blue; font-size: 120%; font-weight: bold; text-decoration: none; font-family: verdana;" href="page_1034.html">< previous page</a></td> <td align="center" width="40%" style="background: #EEF3E2"><strong style="color: #2F4F4F; font-size: 120%;">page_1035</strong></td> <td align="right" width="30%" style="background: #EEF3E2"><a style="color: blue; font-size: 120%; font-weight: bold; text-decoration: none; font-family: verdana;" href="page_1036.html">next page ></a></td> </tr> <tr> <td align="left" colspan="3" style="background: #ffffff; padding: 20px;"> <table border="0" width="100%" cellpadding="0"><tr><td align="center"> <table border="0" cellpadding="2" cellspacing="0" width="100%"><tr><td align="left"></td> <td align="right"></td> </tr></table></td></tr><tr><td align="left"><p></p><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="right"><font face="Times New Roman, Times, Serif" size="2" color="#FF0000">Page 1035</font></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"><img src="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" border="0" width="24" height="1" alt="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" /></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Courier New, Courier, Mono New, Courier, Mono" size="2">int聽聽聽someVal;<br />float聽velocity[10];</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"><img src="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" border="0" width="29" height="1" alt="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" /></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3">and the declarations in Question 1,</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"><img src="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" border="0" width="29" height="1" alt="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" /></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3">a. how would you make </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">intPtr</font><font face="Times New Roman, Times, Serif" size="3"> point to </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">someVal</font><font face="Times New Roman, Times, Serif" size="3"> and then use </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">intPtr</font><font face="Times New Roman, Times, Serif" size="3"> to store </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">25</font><font face="Times New Roman, Times, Serif" size="3"> into </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">someVal</font><font face="Times New Roman, Times, Serif" size="3">?</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"><img src="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" border="0" width="29" height="1" alt="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" /></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3">b. how would you make </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">arrPtr</font><font face="Times New Roman, Times, Serif" size="3"> point to </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">velocity</font><font face="Times New Roman, Times, Serif" size="3"> and then use </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">arrPtr</font><font face="Times New Roman, Times, Serif" size="3"> to store </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">6.43</font><font face="Times New Roman, Times, Serif" size="3"> into the third element of </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">velocity</font><font face="Times New Roman, Times, Serif" size="3">? (pp. 968979)</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3">3. Given the declaration</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"><img src="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" border="0" width="24" height="1" alt="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" /></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Courier New, Courier, Mono New, Courier, Mono" size="2">RecType聽oneRec;</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"><img src="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" border="0" width="29" height="1" alt="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" /></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3">and the declarations in Question 1,</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"><img src="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" border="0" width="29" height="1" alt="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" /></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3">a. how would you make </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">recPtr</font><font face="Times New Roman, Times, Serif" size="3"> point to </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">oneRec</font><font face="Times New Roman, Times, Serif" size="3">?</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"><img src="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" border="0" width="29" height="1" alt="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" /></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3">b. what are two different expressions using </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">recPtr</font><font face="Times New Roman, Times, Serif" size="3"> that will store </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">120.5</font><font face="Times New Roman, Times, Serif" size="3"> into the </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">weight</font><font face="Times New Roman, Times, Serif" size="3"> member of </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">oneRec</font><font face="Times New Roman, Times, Serif" size="3">? (pp. 968979)</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3">4. a. In a single statement, declare a pointer variable named </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">dblPtr</font><font face="Times New Roman, Times, Serif" size="3"> and initialize it to the address of a newly created dynamic variable of type </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">double</font><font face="Times New Roman, Times, Serif" size="3">. Then, in a second statement, store </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">98.32586728</font><font face="Times New Roman, Times, Serif" size="3"> into the dynamic variable.</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"><img src="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" border="0" width="29" height="1" alt="3e26ecb1b6ac508ae10a0e39d2fb98b2.gif" /></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3"> b. In a single statement, declare a pointer variable named </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">list</font><font face="Times New Roman, Times, Serif" size="3"> and initialize it to the base address of a newly created dynamic array of </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">50聽int</font><font face="Times New Roman, Times, Serif" size="3"> elements. Then give a section of code that will zero out the array. (pp. 979986)</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"></td> <td colspan="3" height="12"></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -