You are on page 1of 13

Q1.

Develop a program to demonstrate the use of labelled break and


continue statements.

Input:
Output:

Q2.Develop a program to demonstrate the use of for each loop.

Input:
Output:

Q3.Develop a program to sort an array in ascending and


descending order.
Input:
Output:
Q4.Develop a program to create a student class (Registration number,
name, city) and display details of two students.

Input:

Output:
Q5.Develop a program to create an array of 3 objects for employee
class (empid, name) and display their details.

Input:

Output:
Q6.Develop a program that will take a string from a command line
argument and check whether it is a palindrome or not.

Input:

Output:
Q7.Write a program for finding area of different geometric shapes
(Circle, Rectangle and Cube) using method overloading. In this,
method name for each geometric shape will be same, but they will
return area value depending upon the parameters.

Input:
Output:
Q8.Write a Program to generate Fibonacci Series using recursion.
Use Constructor to initialize the Data member.

Input:

Output:
Q9.Develop a program to demonstrate constructor overloading. Write
down minimum four constructors.

Input:

Output:
Q10.Develop a program to accept a sentence and display the words in
it (using command line arguments as well as split() method).

Input:

Output:
Abhishek
222010322018 Cse AIML_A

You might also like