c vs java (2).pptx

AmitSingh770691 318 views 10 slides Apr 06, 2023
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

C v/s JAVA ppt


Slide Content

Object Oriented Programming TOPIC: Difference between Java and C language By Amit Singh UNIVERSITY ROLL: 14501221093

INTRODUCTION JAVA : Java is an object-oriented programming language that produces software for multiple platforms. When a programmer writes a Java application, the compiled code (known as bytecode) runs on most operating systems (OS), including Windows, Linux, and Mac OS. Java derives much of its syntax from the C and C++ programming languages. C : C is a powerful general-purpose programming language. It can be used to develop software like operating systems, databases, compilers, and so on. C programming is an excellent language to learn to program for beginners

KEY FEATURES OF JAVA One of the most interesting and important features which Java supports is the WORA – Write Once Run Anywhere – feature. Once compiled, Java code can be run on any computing platform. For example, if a Java code has been written on a MAC Operating System, the same Java code can be run on a Windows Operating System without any trouble if the Windows Operating System has JVM (Java Virtual Machine) installed on it. Java is purely an Object-Oriented-Programming Language, that is, all Java codes are always written in the form of classes and objects. Java is a multithreaded language with automatic memory management. It has great features for garbage collection and is heavily used for distributed computing because of its network-centricity. Java is dynamic and extensible. Java is also secure and robust.

KEY FEATURES OF C C is a structured programming language that is extremely easy to learn. It is an efficient programming language, that is, it is fast and has very good performance. C is a highly portable and extensible programming language because it is not tied to any hardware or system. Any code written in C can be run on any machine which supports C, without modifying a single line of code. C has a rich set of built-in Operators and libraries with functions. C is modular and statically typed.

HISTORY C was developed by Dennis M. Ritchie between 1969 and 1973. C was originally developed for UNIX operating system to beat the issues of previous languages such as B, BCPL, etc. Java was developed by James Gosling in 1995.

Language type C Java C is a Procedural Programming Language. C is more procedure-oriented. C is a middle-level language because binding of the gaps takes place between machine-level language and high-level languages. Java is an Object-Oriented language. Java is more data-oriented. Java is a high-level language because the translation of code takes place into machine language using a compiler or interpreter.

Programming Paradigms (pattern/models) C Java C generally breaks down to functions. It is more procedure oriented. Java breaks down to Objects. It is more data-oriented. Object Management In C one has to manage it manually. In java it is automatically managed by the garbage collector.

Memory Allocation C Java Memory allocation can be done by malloc. For freeing the memory one has to use free. Memory allocation can be done by a new keyword. Compiler will do it internally by calling the garbage collector. Calling Functionality It supports call by value and call by reference. It only supports the call by value.

Variable Declaration C Java Declaration of variables should be at the beginning of the block. We can declare variables anywhere though it is a good practice to declare the variables at the beginning of the block. keywords It has 32 keywords. It has 50 keywords.
Tags