Posts

Showing posts with the label C

C Vs Java

I read an article about the compassion of C and Java programming Language. There is a article shared by with a deep research of some genious. Task C Programing Language Java Programing Language type of language function oriented object oriented basic programming unit function class = ADT portability of source code possible with discipline yes portability of compiled code no, recompile for each architecture yes, bytecode is "write once, run anywhere" security limited built-in to language compilation gcc hello.c creates machine language code javac Hello.java creates Java virtual machine language bytecode linking in the Math library gcc -lm calculate.c no special flags needed joint compilation gcc main.c helper1.c helper2.c javac Main.java - any dependent files are automatically re-compiled if needed execution a.out loads and executes program java Hello interprets byte code hello, world #include<stdio.h> int main(void) {    printf(...