[go: up one dir, main page]

0% found this document useful (0 votes)
10 views8 pages

Programming Questions

The document contains a comprehensive list of programming questions and tasks related to conditional statements, loops, methods, arrays, and string manipulation. Each task is designed to enhance programming skills by requiring the implementation of various algorithms and logic. The tasks range from basic input/output operations to more complex algorithms involving data structures and string processing.

Uploaded by

Techni Hemanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views8 pages

Programming Questions

The document contains a comprehensive list of programming questions and tasks related to conditional statements, loops, methods, arrays, and string manipulation. Each task is designed to enhance programming skills by requiring the implementation of various algorithms and logic. The tasks range from basic input/output operations to more complex algorithms involving data structures and string processing.

Uploaded by

Techni Hemanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Programming Questions :

if & if else statements:


1. WAJPT Read the integer value from the user and print that value in
positive format.
2. WAJPT read the 2 integer value from the user and print the biggest
among them.
3. WAJPT read the integer value from the user and print that integer
is negative and positive?
4. WAJPT read one integer value from the user and print that integer
value is special two digit number or not?
5. WAJPT read 2 integer value from the user and print those are equal
are not?
6. WAJPT print user entered number is Zero or not?
7. WAJPT print user entered number is even or odd?
8. WAJPT check the given number is even or odd without using
modulus operator.
9. WAJPT check the given number is even or odd without using if
statement.
10. WAJPT check the given number is even or odd using ternary
operator.
11. WAJPT check the given number is even or odd without using
arithmetic operator.
12. WAJPT check given character is digit or not ?
13. WAJPT check given character is Alphabet or not ?
14. WAJPT check given character is Special character or not ?
15. WAJPT read the person name and his age and print is he eligible
to vote or not?
16. WAJPT read the month number from the user and print is that
month number is valid or not?
17. WAJPT read the 4 subject marks of a student and print the result
pass or fail?
Else if ladder:

18. WAJPT read 3 integer values from the user and print the biggest
among them?
19. WAJPT read the month number from the user and print how
many days are there in that month?
20. WAJPT read one integer value from the user and print that
integer is digit or number?
21. WAJPT find the smallest among the 4 number?
22. WAPT read the character from the user and print it is alphabet
or digit or special character?
23. WAPT read the character from the user and print it is alphabet
or digit or special character using built in functions
24. WAJPT to read 3 double values from the user and print biggest
among those 3?
25. WAJPT read the month number from the user and print the
corresponding month name?
26. WAJPT read the integer value from the user, if the number is
divisible by 3 print sanju , if the number is divisible by 5 print
geetha , if number is divisible by both 3 & 5 print sanju weds
geetha else print break-up.
27. WAJPT group the boxers according to their weight?
28. WAJPT check whether given character is vowel or consonant?
Conditional Operator :
29. WAJPT check given number is positive or not using conditional
operator?
30. WAJPT print biggest among 3 numbers using conditional
operator?
31. WAJPT print 2 numbers are equal or not using conditional
operator?
32. WAJPT check user entered number is special two digit number
or not using conditional operator?
33. WAJPT read the 3 distinct int value from the user and print the
middle value using if statement?
34. WAJPT read the 3 distinct int value from the user and print the
middle value using conditional operator?
35. WAJPT read the 3 integer value from the user and print them in
ascending order using if statement?
36. WAJPT read the 3 integer value from the user and print them in
ascending order using conditional operator?
37. WAJPT check user entered year is leap year or not?
38. WAJPT read the date from the user and print that date is valid or
invalid?
Loops
39. WAJPT print the numbers from 1 to 10.
40. WAJPT print the even numbers from 1 to 10.
41. WAJPT print the odd numbers from 1 to 10.
42. WAJPT print the numbers from 10 to 1.
43. WAJPT print the Alphabets from A to Z.
44. WAJPT calculate sum of natural numbers from 1 to n.
45. WAJPT calculate sum of even numbers from 1 to n.
46. WAJPT calculate product of natural numbers from 1 to n.
47. WAJPT calculate product of even numbers from 1 to n.
48.
49. WAJPT count the alphabets from A to Z.
50. WAJPT print the digits of given number separately.
51. WAJPT reverse the given number.
52. WAJPT check whether given number is palindrome or not.
53. WAJPT find the factorial of given number.
54. WAJPT check whether given number is prime number or not.
55. WAJPT check whether given number is Strong number or not.
56. WAJPT check whether given number is spy number or not.
57. WAJPT check whether given number is perfect number or not.
58. WAJPT check whether given number is neon number or not.
59. WAJPT check whether given number is sunny number or not.
60. WAJPT check whether given number is happy number or not.
61. WAJPT check whether given number is Arm strong number or
not.
62. WAJPT check whether given number is disarium number or not.
63. WAJPT check whether given number is Xylom or phloem
number .
Patterns
60 programs.

Methods :
64. Design a method to print the addition of 2 numbers.
65. Design a method to print the multiplication of 2 numbers.
66. Design a method to print the Subtraction of 2 numbers.
67. Design a method to print the division of 2 numbers.
68. Design a method to return the Largest of 2 numbers.
69. Design a method to return the smallest of 3 numbers.
70. Design a method to return the factorial of given number.
71. Design a method to return the prime number from 1 to 100.
72. Design a method to return the Even number from 1 to 100.
73. Design a method to return the Strong number from 1 to 100.
74. Design a method to return the perfect number from 1 to 100.
75. Design a method to return the Neon number from 1 to 100.
76. Design a method to return the sunny number from 1 to 100.
77. Design a method to return the happy number from 1 to 100.
78. Design a method to return the spy number from 1 to 100.

Arrays
79. Design a method to read size from user and Create an 1D Array
Object
80. Design a method to read the elements from user initialize the 1D
Array Object elements.
81. Design a method to print the 1D Array Object elements.
82. Design a method to read size from user and Create an 2D Array
Object
83. Design a method to read the elements from user initialize the 2D
Array Object elements.
84. Design a method to print the 2D Array Object elements.
85. WAJPT find the number of elements in the array.
86. WAJPT find sum of the elements in the array.
87. WAJPT find sum of the even index elements in the array.
88. WAJPT find sum of the odd index elements in the array.
89. WAJPT find Avg of the elements in the array.
90. WAJPT find largest element in the array.
91. WAJPT find smallest element in the array.
92. WAJPT read the integer array elements from user and print
elements which are greater than 25.
93. WAJPT read the integer array elements from user and print how
many even and odd numbers present.
94. WAJPT count number of prime number in the array.
95. WAJPT read the char[ ] from the user and count how any upper
case ,lower case, digits and spl characters are there?
96. WAJPT Store the 5 students name in an array and print them ?
97. WAJPT reverse an Array.
98. WAJPT read 2 array from the user and merge those into 1 array.
99. WAJPT read an array of size 5 from the user and insert the
element 15 at index 3.
100. WAJPT read an array of size 5 from the user and delete the
element present in index 3.
101. WAJPT print the frequency of array element?
102. WAJPT print the element with higher frequency?
103. WAJPT remove duplicate elements in the array?
104. WAJPT find the missing number in integer array of 1 to 10?
105. WAJPT find the given number is present in the array or not?
106. WAJPT to store the student details in an array and if the mock
rating of student is if 1 send to interview , if 2 or 3 ask for re-
mock.
107. WAJPT read the integer array for the user and sort in ascending
order.
108. WAJPT read the integer array for the user and sort in
descending order.
109. WAJPT read the students names from user and store them in
String array and sort them in alphabetical order.
110. WAJPT read employee detail from the user and store in an array
and sort them by employee id?
111. WAJPT read laptop detail from the user and store in an array
and sort them by ram size?
112. WAJPT read bikes detail from the user and store in an array and
sort them by bikes price?

String class
113. WAJPT read the string from the user and print how many upper
case , lower case, digits and special characters are present.
114. WAJPT find the sum of digits in the string.
115. Design a method to return true if the given string is palindrome?
116. Define method to convert all character into upper case.
117. Define method to convert all character into lower case.
118. WAJPT convert last character to upper case and remaining all
to smaller case.
119. 42. WAJPT all vowels into capital remaining small.
120. WAJPT swap first character with last character of string
121. WAJPT check string is ending with given character or not.
122. WAJPT print the frequency of each character in the given
string?
123. WAJPT find how many vowels and consonant are there in
string?
124. WAJPT read the string and print the characters from index 0 to
3.
125. WAJPT read the string and check given character is present in
the string or not?
126. WAJPT convert the String into String[ ].
127. WAJPT count number of words in given string.
128. WAJPT convert the String[ ] into String .
129. WAJPT replace the index 0 character with H. ( given String
Zero).
130. WAJPT remove the extra space in the sentence
131. WAJPT to check the given 2 strings are same or not.
132. WAJPT to reverse the string.
133. WAJPT to convert string into char[ ] .
134. WAJPT to convert string into char[ ] without using inbuilt.
135. WAJPT convert char[] into string.
136. WAJPT convert char[] into string without using the built-in.
137. WAJPT check the string is pangram or not?
138. WAJPT check the strings are anagram or not?
139. WAJPT remove the duplicate from the string?
140. WAJPT reverse each words in string without interchanging

You might also like