HELP! Sample program in String 3 dimensional array in TURBO C
Good day, can you give me some sample program that hold string in 3 dimensional array.. because our instructor didn't expound the discussion about multidimensional array then is it useful in our final project this semester..Hoping for reply
#include <stdio.h>
int main() {
int i;
char oneDimensional[]="I am one-dimensional!\n";
char twoDimensional[5][5]={
"I am",
{'t','w','o','-',0},
"dime",
"nsio",
"nal!"
};
printf("%s",oneDimensional);
for(i=0;i<5;i++){
printf("%s",twoDimensional[i]);
}
return 0;
}
Which outputs this:
I am one-dimensional!
I amtwo dimensional!
Yes, I know it's missing a space. However, to keep it inside 5x5 and include the trailing 0's at the same time, I realized I was too lazy to fix it.
Thank you for the reply DeanMSands3, i have some in idea in 1d and 2d array in integer.. all i need is in string because in my program it deals with string that can be search,deleted, edit and more, also use 3d array with this program...
thank you zeroliken for that thread but i didn't understand well... just a newbie in programming.. i want some example in string in using 3d array in TURBO C.. Hope you can help...