Write a program that receives a string (char array), its size a number n and create 2D- dynamic array of size/n x n. Fill the array using character from passed string. Note: You have to make the logic if the size is divisible or not if not then what will be the number of column. Matrix size greater than string length then fill indexes with ‘0’,

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 24PE
icon
Related questions
Question

Write a program that receives a string (char array), its size a number n and create 2D-
dynamic array of size/n x n. Fill the array using character from passed string.
Note: You have to make the logic if the size is divisible or not if not then what will be the
number of column. Matrix size greater than string length then fill indexes with ‘0’,

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning