rosli_2252 0 Report post Posted June 7, 2005 Baru baru ni saya ada beli buku komputer bertajuk "Menguasai Bahasa C".Saya studi baru dua bab . Dalam bab ke dua ada latihan di berikan tapi jawapan tidak di berikan untuk rujukan. Saya cuba jugaklah menjawabnye tapi saya rasa ada yang salah . harap kome semua dapat betulkan lah ye .Berikut adalah soalan tersebut :-1.Daripada 5 jenis pengistiharan data berikut , sila nyatakan pengistiharan yang salah dan betulkannya semula.a)int x , y ; a , bb)char a='3'c)float i, j, c;d)int a , b , c , d , f , g , h .e)int i =10.5Jawapan aku :-a)int x , y , a , b ;b)char a='3'c)float i , j , c ,d)int a , b , c , d , e , f , g , h ;e)int i=102.Andaikan satu rentetan itu adalah "I'm a student" , silalukiskan keadaan memori yang menyimpan data ini .Jawapan aku : |I | |' | |m| | | |a | | | |s | |t | |u| |d| |e| |n| |t |3.Sila nyatakan nilai decimal bagi data nilai berikut :a)0x38 b)036 c)098 d)0x75 e)0xEEJawapan aku:a)56 b)30 c)152 d)117 e)2384.Andaikan a=10 , b=18 dan c=5 , apakah keputusan bagi unkapan berikut?a)s=a+b; b.s=2*a+3-c; c)s=b*c+20/b; d)s=-a+c-3;jawapan akua)s=28 b.s=18 c)s=71 d)s=05.Andaikan s merupakan integer, b merupakan nombor titik apungan dengan nilainya sebagai 3.5 , dan c merupakan integer dengan nilainya sebagai 4 , apakah keputusan bagi ungkapan berikut?a)s=c+b; b.s=-b+c=8; c)s='B'-'R'; d)s=b*c+3.8; e)s=c / s=10Jawapan akua)s=7 s=7 c)s=-16 d)s=17 e)s=06.Andaikan a , b , c merupakan integer, dan nilainya sama-sama merupakan 5 , kirakan keputusan a , b , dan c bagi ungkapan berikut.a)a+=b + c++; b.a-=++b + c--; c) a*=a - c--; d)a / =16 + b++ - c++;jawapan akua)a=16 b=5 c=6b.a=3 b=6 c=4c)a=21 c=4d)a=0 b=6 c=6tamat latihan!Harap kome semua dapat bantu aku . Aku bukan pelajar u , aku hanya budak biasa yang tak mampu untuk ke u tapi bersungguh-sungguh untuk mendapat ilmu.Aku tiada cikgu untuk menanya. Hanya pada kome semua aku berharap! Quote Share this post Link to post Share on other sites
Ancient One 3 Report post Posted June 8, 2005 Soalan matematik tu bleh confirm sendiri.soalan 1. float i, j, c; sama jer ngan float i, j, c; so tak salah. setiap variable declaration kena tamatkan dengan ";", e.g char a='3'; list of variable names kena pisahkan dengan "," e.g int x,y,a,b; aku lebih prefer betulkan int i=10.5; dengan float i=10.5; soalan 2. C string sentiasa diakhiri dengan 0 (null). So, dalam memory, "I'm student" actually ada null sebagai aksara terakhir. Quote Share this post Link to post Share on other sites
rosli_2252 0 Report post Posted June 9, 2005 thank you ! o macam tu rupanya . Tak sabar rasenye nak tunggu ulasan soalan lain. Quote Share this post Link to post Share on other sites
f a 0 Report post Posted June 10, 2005 3.Sila nyatakan nilai decimal bagi data nilai berikut :a)0x38 b)036 c)098 d)0x75 e)0xEEJawapan aku:a)56 b)30 c)152 d)117 e)238←Jawapan aku plak:56 30 bukan nombor octal 117 238 Quote Share this post Link to post Share on other sites
b1naryc0de 1 Report post Posted June 13, 2005 Aku laks try..4.Andaikan a=10 , b=18 dan c=5 , apakah keputusan bagi unkapan berikut?a)s=a+b; b.s=2*a+3-c; c)s=b*c+20/b; d)s=-a+c-3;jawapan akua)s=28 b.s=18 c)s=71 d)s=0Jawapan aku:a) s = 10+18 = 28b )s = 2 * 10 + 3 - 5 = 20 + 3 - 5 = 18c) s = 18 * 5 + 20 / 18 = 90 + 1 = 91 (ini kalo int)atauc) s = 18 * 5 + 20 / 18 = 90 + 1.1111 = 91.1111 (float)d) s = -10 + 5 - 3 = -8aras keutamaan mula dari (++,--) , (- unary) , (*,/,%) , (+,-)untuk aras yang sama kira dari kiri ke kanan..integer boleh nilai negatif.. Quote Share this post Link to post Share on other sites
rosli_2252 0 Report post Posted June 14, 2005 terima kasih . baik sungguh kamu , berkongsi ilmu dgn saya . Quote Share this post Link to post Share on other sites
b1naryc0de 1 Report post Posted June 14, 2005 Ish.. Janganlah ckp camtu.. Malu lak aku .. Bukan banyak pon aku jawab.. Pepehal ko dah habis bab 3 belum?? Quote Share this post Link to post Share on other sites
rosli_2252 0 Report post Posted June 25, 2005 Baca dah abis tapi latihannye kena buat dalam c . Ni tengah tunggu cukup bulan untuk beli software C . Kalu beli sofwe tak ori leh guna buat belajar tak haaa?Ke dia ade kekurangan function ? sofwe ori mahal laaa , entah cukup atau tak gaji aku kalu nak beli sofwe ori . Quote Share this post Link to post Share on other sites
b1naryc0de 1 Report post Posted June 25, 2005 Boleh.. tak jadi masalah.. beli jer visual studio 6 atau pun borland c++.. jangan terbeli ebook dia sudahlah Quote Share this post Link to post Share on other sites
paradox 0 Report post Posted June 25, 2005 Baca dah abis tapi latihannye kena buat dalam c . Ni tengah tunggu cukup bulan untuk beli software C . Kalu beli sofwe tak ori leh guna buat belajar tak haaa?Ke dia ade kekurangan function ? sofwe ori mahal laaa , entah cukup atau tak gaji aku kalu nak beli sofwe ori . ←aku beli software tak ori...tapi okay ler... Quote Share this post Link to post Share on other sites
Ancient One 3 Report post Posted June 26, 2005 kalau ada akses ke net, download jer yang free.. berlambak. guna keyword cam 'free C compiler' atau aper2 laa kat google. Quote Share this post Link to post Share on other sites
rosli_2252 0 Report post Posted June 30, 2005 buleh download ikut internet ke?? besar tak file die ? Kena ade broadband ke kalu nak download ?? Boleh korang postkan link die.. Quote Share this post Link to post Share on other sites
publicENEMY 0 Report post Posted July 1, 2005 tengok dalam buku yg dibeli tu. dia guna compiler apa. for sake of simplisiti, beli ikut yg buku suruh. beli yg [lanun] pun takper. for non commercial purpose, usually they dont bother. especially if its about education. bcouse they know, at the end, when you want to put the knowledge to live by, then you would use the pirated software you learn back then. Quote Share this post Link to post Share on other sites
MalaysianSecurityForce 0 Report post Posted July 1, 2005 borland c++ 5.5 boleh dapat free. try tgk kat http://www.borland.com/products/downloads/...d_cbuilder.html Quote Share this post Link to post Share on other sites
MalaysianSecurityForce 0 Report post Posted July 1, 2005 tutorial cara install boleh rujuk di : http://cplus.about.com/od/compilersandides/l/aa031502a.htm Quote Share this post Link to post Share on other sites
1kHz 0 Report post Posted July 1, 2005 http://www.bloodshed.net/devcpp.htmlcekupan skrin Quote Share this post Link to post Share on other sites
smily 0 Report post Posted August 15, 2005 ada satu gi kat sini:http://www.smorgasbordet.com/pellesc/ni lengkap skali ngan help files utk penerangan psl libraries yg digunakan. Quote Share this post Link to post Share on other sites