梓囚徒貧圭�鮗� ○ 賜 ★ 辛酔堀貧和鍬匈��梓囚徒貧議 Enter 囚辛指欺云慕朕村匈��梓囚徒貧圭�鮗� ● 辛指欺云匈競何��
!!!!隆堋響頼��紗秘慕禰厮宴和肝写偬堋響��
func��&num���察 �
。。。。。。。。
��
。。。。。。。。。。
Here�察�the function argument ^&num ̄ is passed 。
a。 by value b。 by reference
III。 Practice
Create a tree�察�which has h ��h〃0�� layers�察�and its each node has w ��w〃0�� sub´nodes。
Please plete the following inplete solution。
#include
#include
struct tree��
char info�察 �
p_sub�察�//link to sub´nodes
���察 �
// allocate memory and initiate
void dnode �─�struct tree* tmp ��
��
= malloc�─�sizeof ��struct tree�� ���察 �
= 0x41�察 �
= NULL�察 �
��
struct tree *dtree ��struct tree* subtree�察�int height�察�int width��
��
int i�察 �
if �─。�subtree �� //if necessary�察�allocte memory for subtree
denode��subtree���察 �
if �─�height == 1 ��
return subtree�察 �
else if �─�height == 2 �� ��
struct tree *leaf = NULL�察 �
for �─�i=0�察�i denode �─ 。��察 �
�察 �
leaf = NULL�察 �
��
return subtree�察 �
��
else ��
for �─�i=0�察�i
��
return subtree�察 �
��
��
main�┌�
��
。。。。。。。。。
struct tree *root = NULL�察 �
root = dtree ��root�察�h�察�w�� �察�// h and w are integers get from input
。。。。。。。。。
��
及1嫗 兆二永編寔籾娼僉40。 蒙寄侏二匍!!噸爺C����永編籾
1��糞�嵋��鯀官輊廠�匯倖准泣P��壓准泣P朔峨秘匯倖准泣��亟竃宸曾倖痕方。
2��亟匯倖痕方��繍凪嶄議t脅廬算撹4倖腎鯉。
3��Windows殻會議秘笥頁陳戦�塵干�Windows��連字崙議送殻。
4��泌採協吶才糞�嶢燦�窃議撹埀痕方葎指距痕方�拭 �
5��C����戦中頁音頁侭嗤議強恬脅頁main�┌�哈軟議�身膵�音頁��萩訟箭。
6��C����戦中泌採蕗苧const void f��void��痕方葎C殻會嶄議垂痕方�拭 �
7��和双陳曾倖頁吉揖議
int b�察 �
A const int* a = &b�察 �
B const* int a = &b�察 �
C const int* const a = &b�察 �
D int const* const a = &b�察 �
8��坪選痕方壓園咎扮頁倦恂歌方窃侏殊臥�拭 �
void g��base & b����
b。play�察 �
��
void main�┌���
son s�察 �
g��s���察 �
return�察 �
��
及1嫗 兆二永編寔籾娼僉41。 晩云广兆二匍!!Sony永編籾
1��頼撹和双殻會
*
*。*。
*。。*。。*。。
*。。。*。。。*。。。*。。。
*。。。。*。。。。*。。。。*。。。。*。。。。
*。。。。。*。。。。。*。。。。。*。。。。。*。。。。。*。。。。。
*。。。。。。*。。。。。。*。。。。。。*。。。。。。*。。。。。。*。。。。。。*。。。。。。
*。。。。。。。*。。。。。。。*。。。。。。。*。。。。。。。*。。。。。。。*。。。。。。。*。。。。。。。*。。。。。。。
#include
#define N 8
int main�┌�
��
int i�察 �
int j�察 �
int k�察 �
´
�� ��
�� ��
�� ��
´
return 0�察 �
��
2��頼撹殻會��糞�峩塋�怏議週會電會
#include
void sort�─ 。��察 �
int main�┌�
��
int array�В�=��45��56��76��234��1��34��23��2��3���察�//方忖販//吭公竃
sort�─ 。��察 �
return 0�察 �
��
void sort�─ 。�
��
____________________________________
�� ��
�� ��
��´��
��
3��継襖椎凪方双��1��1��2��3��5´´園亟殻會箔及噴�遏�辛參喘弓拷��匆辛參喘凪麿圭隈��徽勣傍苧低僉夲議尖喇。
#include
int Pheponatch��int���察 �
int main�┌�
��
printf�─�The 10th is ��d;��Pheponatch��10�����察 �
return 0�察 �
��
int Pheponatch��int N��
��
�� ��
�� ��
��
4��和双殻會塰佩扮氏雲寸��萩孀竃危列旺個屎��旺拝傍苧圻咀。
#include
#include
typedef struct��
TNode* left�察 �
TNode* right�察 �
int value�察 �
�� TNode�察 �
TNode* root=NULL�察 �
void append��int N���察 �
int main�┌�
��
append��63���察 �
append��45���察 �
append��32���察 �
append��77���察 �
append��96���察 �
append��21���察 �
append��17���察�// Again�察(�忖販吭公竃
��
void append��int N��
��
TNode* NewNode=��TNode *��malloc��sizeof��TNode�����察 �
NewNode´〃value=N�察 �
if��root==NULL��
��
root=NewNode�察 �
return�察 �
��
else
��
TNode* temp�察 �
temp=root�察 �
while�┌�N〃=temp。value && temp。left��=NULL�� ���� ��N ����
��
while��N〃=temp。value && temp。left��=NULL��
temp=temp。left�察 �
while��N temp=temp。right�察 �
��
if��N〃=temp。value��
temp。left=NewNode�察 �
else
temp。right=NewNode�察 �
return�察 �
��
��
及1嫗 兆二永編寔籾娼僉42。略櫛VERITAS罷周永編籾
1。 A class B work on the inter has a sub mask of 255。255。240。0�察�what is the maximum number of hosts per sub 。
a。 240 b。 255 c。 4094 d。 65534
2。 What is the difference�此�between o��log n�� and o��log n^2���察�where both logarithems have base 2 。
a。 o��log n^2�� is bigger b。 o��log n�� is bigger
c。 no difference
3。 For a class what would happen if we call a class¨s constructor from with the same class¨s constructor 。
a。 pilation error