第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

初級C語言代碼,有不懂之處請大神詳解?

初級C語言代碼,有不懂之處請大神詳解?

C
drla 2016-03-31 12:47:26
#include<stdio.h> #define?Height?10 #include<iostream> int?calculate(int?Long,?int?Width); int?main() { ?int?m_Long; ?int?m_Width; ?int?result; ?printf("長方形的高度為:%d\n",?Height); ?printf("請輸入長度\n"); ?scanf("%d",?&m_Long); ?printf("請輸入寬度\n"); ?scanf("%d",?&m_Width); ?result?=?calculate(m_Long,?m_Width); ?printf("長方形的體積是:"); ?printf("%d\n",?result); ?system("pause"); ?return?0; } int?calculate(int?Long,?int?Width) { ?int?result?=?Long*Width*Height; ?return?result; } //請問int?calculate(int?Long,?int?Width)與calculate(m_Long,?m_Width)有什么關(guān)系,為什么 ???m_Long和Long可以互相賦值哪? //
查看完整描述

1 回答

?
guozhchun

TA貢獻(xiàn)103條經(jīng)驗 獲得超76個贊

第4行代碼是calculate函數(shù)的聲明,第19行代碼是calculate函數(shù)的調(diào)用,第26~30行是calculate函數(shù)的定義。

第19行調(diào)用calculate函數(shù)時,會把實參(這里就是m_Long, m_width)的值賦給形參(這里就是第26行的Long, Width)。而形參的值是不會賦值給實參的。也就是說m_Long可以賦值給Long,而Long不能賦值給m_Long

查看完整回答
反對 回復(fù) 2016-03-31
  • 1 回答
  • 0 關(guān)注
  • 1742 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號