0% found this document useful (0 votes)
2 views2 pages

Advanced Programming Questions

The document outlines a series of advanced programming tasks involving multi-dimensional and single-dimensional arrays. Tasks include searching and counting specific words, replacing values based on conditions, calculating averages, validating passwords, and manipulating array data. Each task specifies the requirements and expected outcomes for the programming exercises.

Uploaded by

buttsamim5
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)
2 views2 pages

Advanced Programming Questions

The document outlines a series of advanced programming tasks involving multi-dimensional and single-dimensional arrays. Tasks include searching and counting specific words, replacing values based on conditions, calculating averages, validating passwords, and manipulating array data. Each task specifies the requirements and expected outcomes for the programming exercises.

Uploaded by

buttsamim5
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/ 2

Advanced Programming Questions

1. Search and Count in a Multi-Dimensional Array:


Given a 2D array named `SearchBox` with 1000 rows and 50 columns, count how many
times the word `"Empty"` appears in odd-indexed rows and even-indexed columns.

2. Replace and Count in a 2D Array:


You have a 2D array `SearchBox` with 700 rows and 40 columns. Replace the word
`"Empty"` with `"Full"` but only for entries in rows divisible by 5. Print the total number of
replacements made.

3. Single-Dimensional Array Count:


Given an array `Items` of size 1000, count the occurrences of the words `"Empty"`, `"Full"`,
and `"Pending"`. Print the counts for each word separately.

4. Create and Initialize a Multi-Dimensional Array:


Create a 2D array `Matrix` with 300 rows and 60 columns. Initialize all cells as
`"Unassigned"`. Then, set all cells in rows divisible by 10 and columns divisible by 3 to
`"Assigned"`.

5. Dynamic Average Calculation:


Write a program that takes numbers as input until the user types `-1`. Calculate the
average, but exclude any numbers greater than 100. Display the final average and the
count of valid numbers.

6. Find Maximum in a List:


Take 10 numbers as input and find both the largest and second-largest numbers. Print
both results.

7. Password Validation with Multiple Rules:


Write a program to validate passwords. The password must:
- Start with a capital letter.
- Be at least 8 characters long.
- Contain at least one number.
If any condition fails, ask the user to re-enter the password until it is valid.

8. Conditional Search and Replace:


You have a 2D array `Grid` with 200 rows and 30 columns. Replace the value `"Error"` with
`"Fixed"` only if the word appears in columns indexed from 10 to 20. Count the
replacements and print the total.

9. Cumulative Product:
Take numbers as input until the user types `0`. Calculate the cumulative product of all non-
zero numbers entered. Print the result.
10. Two-Dimensional Array Manipulation:
You have a 2D array `Scores` with 500 rows and 20 columns. For every row:
- Find the highest value.
- Replace it with the string `"Max"`.
Print the updated array and the row-wise indices of the replaced values.

You might also like