Posts

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:~$

SERVLET IN JAVA

Image
                                          *********SERVLET IN JAVA************* -           Servlet  technology is used to create a web application (resides at server side and                               generates a dynamic web page). -           What is a Servlet? -           Servlet is a technology which is used to create a web application. -           Servlet is an API that provides many interfaces and classes including                                         docu...

-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:~$

Write a C Program to accept an integer and check if it is Even or Odd

  Write a C Program to accept an integer and check if it is Even or Odd.   QUE :- Write a C Program to accept an integer and check if it is Even or Odd. Write a C Program to accept an integer and check if it is Even or Odd. #include<stdio.h> void main() { int num; printf(“enter number”); scanf(“%d”,&num); if(num%2==0) { printf(“number is even”); } else { Printf(“number is odd”); } }     OUTPUT :-   -virtual-machine: ~ $ gcc slip6a.c -virtual-machine:~$ ./a.out enter number 12 number is even

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...