Posts

Showing posts from August, 2020

Featured post

-Write C program to find even and odd number using macro

-Write C program to find even and odd number using macro #include<stdio.h> #define number(n)((n%2==0)?1:0) int main() { int num; printf("enter any number"); scanf("%d",&num); if(number(num)) printf("number is even"); else printf("number is odd"); return 0; } ***************************Output*********************** amr@amrj-virtual-machine:~$ gccevenodd.c amr@samr-virtual-machine:~$ ./a.out enter any number 2 number is evensmj@amr-virtual-machine:~$

java-tautorials

Image
java-tautorials 1 ) Simple • Java is easy to learn and its syntax is quite simple, clean and easy to understand .The confusing and ambiguous concepts of C++ are either left out in Java or they have been re-implemented in a cleaner way. • Eg :  Pointers and Operator Overloading are not there in java but were an important part of C ++. 2) Object Oriented • In java, everything is an object which has some data and behaviour . Java can be easily extended as it is based on Object Model. Following are some basic concept of OOP's. • Object • Class • Inheritance • Polymorphism • Abstraction • Encapsulation 3 ) Robust  -     Java makes an effort to eliminate error prone codes by emphasizing mainly on compile time error checking and runtime checking .  -     But the main areas which Java improved were Memory Management and mishandled Exceptions by introducing automatic  Garbage Collector  and  Except...

JAVA Tautorials

Image
  1.Introduction To JAVA - History and features of JAVA - JDK,JRE,JIT and JVM - Naming conventions - Simple java program - JAVA IDE - Data Types - Variable:final,static,abstract - Types of comments - Array: 1D,2D,Dynamic array using vector - Accepting input using Command line argument - Accepting input from console(Using BufferedReader and Scanner class) History  and  features  of  JAVA: - Java is an object oriented programming language like C++. - Gives all the features of OOP - Was developed by 5 inventors from Sun microsystem,USA in 1991         (James Gosling,Chris Warth,Patrick Naughton,Ed Frank,Mike Sheridan) - Initially known as “Oak” - 1995,Renamed  as “Java” Advantages : • easy to learn -         Java was designed to be easy to use and is therefore easy to write, compile, debug, and learn than other programming languages. • Java is object-oriented - ...