Professional Documents
Culture Documents
Programs Handout
Programs Handout
Programs Handout
C HANDOUT PROGRAMS
C-Language
SAMPLE PROGRAMS
1. Write a program for addition, subtraction, multiplication, division. of two
numbers.
123
123
123
When number=3
www.360digrii.com
_____________________________________________________________________________________
10. Write a program to print the pattern
1 1 1
2 2 2
3 33
4 4 4
When number =4
* *
* **
* ***
When number =4
** *
* * * *
* * * * *
www.360digrii.com
_____________________________________________________________________________________
ARRAYS
18. Write a program to search the number in an array and return the index of that number.
STRINGS
www.360digrii.com
_____________________________________________________________________________________
12
123
1234
When number =4
www.360digrii.com
_____________________________________________________________________________________
5 5 5 5 5
4 4 4 4
3 3 3
2 2
1
Write a sample code to show how to use constructors, and also how to initialize instance
variables.
COLLECTION
1. Write a program to find the size of the linked list and return its size.
www.360digrii.com
_____________________________________________________________________________________
order by using collections.
3. Create a thread inside a thread if inner thread aborted the entire thread
1) Write a JDBC Program to create a connection with database and display the
connection object.
3) Write a JDBC Program to insert the values into the Registration table dynamically.
4) Write a dynamic JDBC Program to delete the record from registration table by using
username.
www.360digrii.com
_____________________________________________________________________________________
5) Write a JDBC Program to update a value in the registration table.
6) Write a JDBC Program to get all the records from the registration table.
SERVLETS
1. Write a Program to create a servlet using servlet interface and display the
5. Write an HttpServlet program to get the values from the registration html
6. Write an HttpServlet program to get the values from the database and
7. Create an application of product using HttpServlets which has the following features
i) Html page to enter the product details (product id, product name, product price).
ii) Servlet to get the product details from the html page and insert into the database.
iii) Display the all product details from the database on webpage.
www.360digrii.com
_____________________________________________________________________________________
8. Create an application to verify the login.
10. Write a dynamic Servlet program which creates a connection to any database
at runtime
JSP
4. Create an application of product using JSP which has the following features
a. Html page to enter the product details (product id, product name, product
price).
b. JSP to get the product details from the html page and insert into the database.
www.360digrii.com
_____________________________________________________________________________________
2. Java program to print and count all the prime numbers present between given range?
10. a) Java Program to Find Square Root of a Number Without sqrt Method
www.360digrii.com
_____________________________________________________________________________________
i) Java Program to Display Odd Numbers From 1 to 100
11) Java Program to copy all elements of one array into another array
12) Java Program to find the frequency of each element in the array
17) Java Program to print the elements of an array present on even position and odd
position
19) Java Program to print the largest element and smallest element in an array
20) Java Program to Print Odd and Even Numbers from an array
22) Java Program to print the sum of all the items of the array
24) Java Program to sort the elements of an array in ascending order and descending order
25) Java Program to Find 2nd and 3rd and Largest Number in an array
26) Java Program to Remove Duplicate Element in an array) Java program to count unique
elements in an array
www.360digrii.com
_____________________________________________________________________________________
29) Java Program to Multiply Two Matrices
32) Java Program to display the lower triangular matrix and upper triangular matrix
33) Java Program to find the frequency of odd & even numbers in the given matrix
35) Java Program to find the sum of each row and each column of a matrix
40) Java Program to count the total number of punctuation characters exists in a String
41) Java Program to count the total number of vowels and consonants in a string
42) Java Program to determine whether two strings are the anagram
44) Java Program to find the longest repeating sequence in a string (very important)
46) Java Program to replace lower-case characters with upper-case and vice-versa
47) Java Program to find Reverse of the string and determine whether a given string is
palindrome
48) Java Program to find maximum and minimum occurring character in a string
www.360digrii.com
_____________________________________________________________________________________
50) Java program to find the duplicate words in a string
52) Java Program to find the largest and smallest word in a string
54) Java Program to find the most repeated word in a text file
55) Java Program to swap two string variables without using third or temp variable.
56) Java Program to print smallest and biggest possible palindrome word in a given string
59) Java program to convert given input from one form to another form (like decimal to
octal/hexadecimal/binary)
(a) Java program to create a singly linked list of n nodes and count the number of
nodes
(b) Java program to create a singly linked list of n nodes and display it in reverse
order
(c) Java program to create a Circular Linked List of N nodes and count the number of
nodes
(d) Java program to create a Circular Linked List of n nodes and display it in reverse
order
(e) Java program to create a doubly linked list of n nodes and count the number of
nodes
(f) Java program to create a doubly linked list of n nodes and display it in reverse
order
www.360digrii.com