2-D array





Q1. Write a program that stores integer values in an array of 2 rows and 4 columns.
Q2. Write a program that initializes a two-dimensional array of 2 rows and 3 columns and then displays its value.
Q3. Write a program that inputs 12 integers in a two-dimensional array of 3 rows and 4 columns and finds the largest number.
Q4. Write a program that declares two-dimensional integer arrays of 3 rows and 4 columns. It initializes the array with data 30,20,55,206,78,81,25,90,3,48,67,104. It finds the total of all values.
Q5. Write a program that multiplies each element of an array by 2 that has 3 rows and 4 columns. It displays the value in the form of a matrix. The array is initialized with the value from 1 to 12.
Q6. Write a program that displays all values of the given array in the form of a matrix and find its sum: int arr [3][2] = {{6,3},{7,8},{4,5}}
Q7. Write a program that finds the sum of all positive numbers in the given array: int arr [3][4] = {{4,18,-16,11},{-5,10,-2,12},{15,-3,17,18}}
Q8. Write a program that adds the corresponding elements of two 2-dimensional arrays with 2 rows and 4 columns. It displays the result in the form of a matrix.
Q9. Write a program that inputs numbers in a 2-dimensional array and prints the sum of each row.
Q10. Write a program that displays the value stored in a string variable name.
Q11. Write the program that inputs the name of the user using cin. get() function and displays it on the screen.
Q12. Write a program in C++ that input data in string and prints it in reverse order.
Q13. Write a program that inputs a string. copies it to another and then prints both strings.
Q14. Write a program that inputs a string and displays the number of words and the number of characters without spaces in the string.
Q15. Write a program that inputs a string from the user and counts the number of vowels in the string.
Q16. Write a program that inputs a string and displays it on the screen.
Q17. Write a program that reads two strings of size 20. It displays both strings with their lengths. It concatenates the second string at the end of the first string and prints it.
Q18. Write a program that reads three strings and displays the smallest string.