Q.28. Write a program to produce the following form.

1
0 1
1 0 1
0 1 0 1
1 0 1 0 1

1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

$ $ $ $ $
$ $ $ $
$ $ $
$ $
$

Q 22. Using switch case perform array operation
A. sorting of array no
B. searching a particular no (taken as an input)
C. Addition of total element in array.
Q.23. Write a program that accepts a shopping list of five items from the command line and stores them in a vector.
Q.24. Write a program, which will read a string and rewrite it in the alphabetical order. For example, the word STRING should be written as GNIRST
Q 25. Write a program, which will take three strings from the command line and display the number of characters in each string.
Q.26. Write a program to find out prime no from 1 to 100
Q.27. Write a program, which will read a text and count all occurrences of a particular letter.

Q.29. Write a utility class to sort the employees according to their names.

Q.30. Write a program to calculate harmonic value. e.g 1+1/2+1/3……1/n

Q.31. Admission to a professional course is subject to the following conditions
a. Marks in mathematics >=60
b. Marks in physics >=50
c. Marks in chemistry >=40
d. Total in all three subjects >=120
OR
Total in mathematics and physics >=150
Given the marks in the three subjects, write a program to process the application to list eligible candidates.

Q.32. Write a class Student; store it in the package stud. Write a class Batch with information about subject, faculty, and timing. Store it in the package bat. Use the class Batch to set information in the Student class.

Q.28. Write a program to produce the following form.

1
0 1
1 0 1
0 1 0 1
1 0 1 0 1

1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

$ $ $ $ $
$ $ $ $
$ $ $
$ $
$

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.