Write a program to find sum of 10 to 20 numbers.

Write a program to find sum of 10 to 20 numbers. #include<stdio.h> #include<conio.h> void main() { clrscr(); int   i, sum=0; for(i=10; i<=20;i++) { sum=sum+i; } printf(“%d”,sum); getch(); }     Output:   165

JAVA

      PRACTICAL LIST OF JAVA


1) Write a Java program to construct a Binary Search Tree and perform deletion and In-order traversal - CLICK HERE


 2) Write a Java program to print the following spiral pattern on the console- CLICK HERE


 3) Java program to delete a node from the beginning of the singly linked list. - CLICK HERE


4) Describe abstract class called Shape which has three subclasses say Triangle, Rectangle, Circle. Define one method area() in the abstract class and override this area() in these three subclasses to calculate for specific object i.e. area() of Triangle subclass should calculate area of triangle etc. Same for Rectangle and Circle. - CLICK HERE


5) Write an small application in Java to develop Banking Application in which user deposits the amount Rs 1000.00 and then start withdrawing of Rs 400.00, Rs 300.00 and it throws exception "Not Sufficient Fund" when user withdraws Rs. 500 thereafter.- CLICK HERE


6) Write a program that executes two threads. One thread will print the even numbers and the another thread will print odd numbers from 1 to 50. - CLICK HERE


7) Write a program that executes two threads. One thread displays “Thread1” every 2,000 milliseconds, and the other displays “Thread2” every 4,000 milliseconds. Create the threads by extending the Thread class.- CLICK HERE


 8) (1) Write an application that illustrates method overriding. (2) Also demonstrate accessibility rules in inside and outside packages. - CLICK HERE


9) 1)Write a programm in java to find maximum of three numbers using conditional operator. 2) Write a programm in java to find second maximum of n numbers without using of array. 3) Write a programm in java to use wrapper class of each primitive data types. - CLICK HERE


10) 1) Write a program in Java to develop overloaded constructor. Also develop the copy constructor to create a new object with the state of the existing object. 
2) Develop minimum 4 program based on variation in methods i.e. passing by value, passing by reference, returning values and returning objects from methods.- CLICK HERE

Comments