问个笔试题,原谅我的题目真的没有看懂,求助求助
#include <stdio.h>
// [Instruction]
// Write the function GetData() which pick out the data
// from Buffer depending on the parameter in the following condition.
// Parameter bit0 ~ 6 Data number
// bit7 Select higher rank data, lower rank data
// 0: lower rank 8bit 1: higher rank 8bit
#define BUF_MAX 2
int Buffer[BUF_MAX] = { 0x1234, 0x5678 };
int GetData( unsigned char Select )
{
int Data;
/************************************************/
/* Write after line 18 to the next comment line.*/
/************************************************/
/************************************************/
return Data;
}
void main( void )
{
int a = GetData( 0x01 );
int b = GetData( 0x0a );
}
// [Instruction]
// Write the function GetData() which pick out the data
// from Buffer depending on the parameter in the following condition.
// Parameter bit0 ~ 6 Data number
// bit7 Select higher rank data, lower rank data
// 0: lower rank 8bit 1: higher rank 8bit
#define BUF_MAX 2
int Buffer[BUF_MAX] = { 0x1234, 0x5678 };
int GetData( unsigned char Select )
{
int Data;
/************************************************/
/* Write after line 18 to the next comment line.*/
/************************************************/
/************************************************/
return Data;
}
void main( void )
{
int a = GetData( 0x01 );
int b = GetData( 0x0a );
}