Pikir dan Rasa

cogito ergo sum

Posts Tagged ‘c

“Write in C” song [Dennis Ritchie, in memoriam]

leave a comment »

When I find my code in tons of trouble,
Friends and colleagues come to me,
Speaking words of wisdom:
“Write in C.”
As the deadline fast approaches,
And bugs are all that I can see,
Somewhere, someone whispers:
“Write in C.”
Write in C, Write in C,
Write in C, oh, Write in C.
LOGO’s dead and buried,
Write in C.
I used to write a lot of FORTRAN,
For science it worked flawlessly.
Try using it for graphics!
Write in C.
If you’ve just spent nearly 30 hours
Debugging some assembly,
Soon you will be glad to
Write in C.
Write in C, Write in C,
Write in C, yeah, Write in C.
Only wimps use BASIC.
Write in C.
Write in C, Write in C
Write in C, oh, Write in C.
Pascal won’t quite cut it.
Write in C.
Write in C, Write in C,
Write in C, yeah, Write in C.
Don’t even mention COBOL.
Write in C.
(and what about C++ ?)

Written by sunupradana

February 28, 2012 at 8:57 am

Posted in Komputer, Technology

Tagged with ,

Ukuran dari variabel (datatypes) pada Arduino

leave a comment »

Berikut adalah kode hasil modifikasi dari kode pada sizes.c [ref], yang disesuaikan khusus untuk sistem Arduino. Untuk mendapatkan hasilnya kita perlu mengaktifkan “Serial Monitor”.


 Modifikasi dari sizes.c


void setup() {

  Serial.print("Bytes per char          : "); Serial.println((sizeof(char)));
  Serial.print("Bytes per unsigned char : "); Serial.println((sizeof(unsigned char)));
  Serial.print("Bytes per short         : "); Serial.println(sizeof(short));
  Serial.print("Bytes per unsigned short: "); Serial.println(sizeof(unsigned short));
  Serial.print("Bytes per int           : "); Serial.println(sizeof(int));
  Serial.print("Bytes per unsigned int  : "); Serial.println(sizeof(unsigned int));
  Serial.print("Bytes per long          : "); Serial.println(sizeof(long));
  Serial.print("Bytes per unsigned long : "); Serial.println(sizeof(unsigned long));
  Serial.print("Bytes per float         : "); Serial.println(sizeof(float));
  Serial.print("Bytes per double        : "); Serial.println(sizeof(double));
  Serial.print("Bytes per long double   : "); Serial.println(sizeof(long double));
  Serial.print("Bytes per size_t        : "); Serial.println(sizeof(size_t));

void loop() {







Written by sunupradana

February 16, 2012 at 2:52 pm

The Essentials of C Programs [link ke kutipan Sams Teach Yourself C in 24 Hours]

leave a comment »

Sams Teach Yourself C in 24 Hours

Hour 3 – The Essentials of C Programs


The whole is equal to the sum of its parts.


In Hour 2, “Writing Your First C Program,” you saw and wrote some simple C programs. You also learned about the basic structure of a C program. You know that a program written in C has to be compiled before it can be executed. In this lesson you’ll learn more essentials within a C program, such as

  • Constants and variables
  • Expressions
  • Statements
  • Statement blocks
  • C function types and names
  • Arguments to functions
  • The body of a function
  • Function calls


Link>> http://web.iku.edu.tr/courses/cs/eng001/

Written by sunupradana

January 14, 2012 at 6:36 pm

Posted in Komputer

Tagged with , ,

Penggunaan define atau const pada bahasa C (perbedaan dengan C++ / CPP)

with one comment

Salah satu kemudahan menggunakan sistem Arduino adalah karena sekalipun terinspirasi dari bahasa Processing, bahasa Arduino yang dipergunakan pada sketch berasal dari C++. Kita bisa mencoba alur logika pemrograman (algoritma) pada banyak kompiler C&C++. Lebih dari itu kita juga bisa memanfaatkan IDE untuk kompiler C/C++, misalnya Codelite, Code::Blocks atau Geany.

Read the rest of this entry »

Written by sunupradana

January 7, 2012 at 6:53 pm

Ideone.com | Online IDE & Debugging Tool >> C/C++, Java, PHP, Python, and 40+ compilers and intepreters

leave a comment »

What is ideone?
Ideone is something more than a pastebin; it’s an online compiler and debugging tool which allows
to compile and run code online in more than 40 programming languages.

How to use ideone?
Choose a programming language, enter your source code and input data into text boxes. Then check or uncheck run code (whether to execute your program) and private (whether not to list your code in the recent codes page) checkboxes, click the submit button and watch your snippet being executed.

Having problems?
Check the samples to see how to write a properly working code. To find out more, see the help section or the FAQ page.

Footer: Autoposted dengan [ email ] dari [ sunu’s posterous ]

Written by sunupradana

January 6, 2012 at 6:02 pm

Online programming, code test [codepad]

leave a comment »

codepad is an online compiler/interpreter, and a simple collaboration tool.
Paste your code below, and codepad will run it and give you a short URL you can use to share it in chat or email.



Footer: Autoposted dengan [ email ] dari [ sunu’s posterous ]

Written by sunupradana

January 6, 2012 at 5:29 pm