------ Oh ya.... @yadieet, thx bukunya, I hope it's legal...:D :toast array dua dimensi : #include <stdio.h> int main(void) { int m = 2, n = 4, v = 1; int p; for(int x=0; x<m; x++) { for(int y=0; y<n; y++) { p = v; v += 2; } } for(int x=0; x<m; x++) { for(int y=0; y<n; y++) { ...
gimanah cara mengecek apakah sebuah string itu 'ascii string' atau bukan, dan panjang string itu melebihi MAX atau tidak ? #define _DEFAULT_SOURCE #include <stdio.h> #include <stdbool.h> #include <ctype.h> #define MAX 128 _Bool is_ascii_str( const char *str ) { int i = 0; whil...
Jika nggak perlu pake pointer, sebaiknya nggak usah pake pointer. Q: kapan harus pake pointer, kasus2 yang gimana pointer benar2 diperlukan ? http://s.kaskus.id/images/2013/07/26/2504916_20130726095142.gif To allocate a block of memory on the heap using `malloc`.. `free`, `calloc`, `realloc` juga
btw gunanya enum itu sebenarnya buat apaan yah ? :hammer http://s.kaskus.id/images/2014/07/13/5216999_20140713035028.gif Enum menjadikan beberapa nama ato nilai konstan (constant names/values) menjadi satu set (satu paket) ato satu list.. :think: So enum itu buat menyimpan, mengelompokkan, melist...
ada yang punya "iso/iec 9899:2011 pdf" ? http://s.kaskus.id/images/2014/07/13/5216999_20140713035153.gif @mio Itu dokumen berbayar. Kalo googling kayaknya ada bajakannya tapi bukan tahun 2011. http://s.kaskus.id/images/2016/08/27/2068109_20160827023645.png :cool
gagal paham gua, terutama untuk portabilitas antar platforms (windows, unix/linux, osx). untuk portabilitas, tipe data buat "char / wchar / string" nya gimanah gans ? http://s.kaskus.id/images/2013/07/26/2504916_20130726095142.gif http://s.kaskus.id/images/2014/07/13/5216999_20140713035...
'unsigned 16bit' nah lo nah lo tambah pusing gua http://s.kaskus.id/images/2013/07/26/2504916_20130726095128.gif 2 tipe data yang ukurannya sama namun berbeda signedness-nya, keduanya sama saja asalkan "bits data"-nya sama.. :) Size dari data suatu character (a unicode character) : =&...
(Tambahan buat post ane sebelumnya) Beginilah implementasi tipe data di JAVA gans : - http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/87ee5ee27509/src/share/vm/prims/jni_md.h - http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/87ee5ee27509/src/cpu/x86/vm/jni_x86.h /* * Copyright (c) 1997, 2013,...
kenapa meng-asumsikan 'int' adalah 32 bit (kenapa bukan 16 bit) ? kenapa pakai short, int, long long ? (kenapa bukan long ?) _Static_assert itu kamsudnya apa ? di JAVA : - short => 16 bit - int => 32 bit - long => 64 bit Wikipedia -- 64 bit computing In many programming environments f...
short : Capable of containing at least the range; thus, it is at least 16 bits in size. int : Capable of containing at least the range; thus, it is at least 16 bits in size. long : Capable of containing at least the range; thus, it is at least 32 bits in size. long long : Capable of containi...
nge-printout program arguments #include <stdio.h> int main (int argc, char *argv) { if (argc < 2) puts("This program need arguments !"); else { for (int i=1; i<argc; i++) puts( argv ); } return 0; } gcc -Wall -Wextra -std=c11 -pedantic bener nggak yah ? http://s.kaskus.id/i...
Thread diskusi pemrograman C. ikut nyimak.. :linux2: C programming, ente2 pake IDE / text-editor apa gans ? http://s.kaskus.id/images/2013/07/26/2504916_20130726095142.gif geany :malu: . .. ... ____:ngacir: