M
manish sahu
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char c[4][3]={
"msh",
"xyz",
"abc",
"CCC",
};
int i,j;
clrscr();
for(i=0;i<=3;i++)
{
for(j=0;c[j]!='\0';j++)
{
printf("%s",c);
}
printf("\n 1 ");
}
getch();
}
i want to print above given 2d string array but this is not giving
correct output plz see the code and explain me the coreect way to
print 2d char array.
#include<conio.h>
#include<string.h>
void main()
{
char c[4][3]={
"msh",
"xyz",
"abc",
"CCC",
};
int i,j;
clrscr();
for(i=0;i<=3;i++)
{
for(j=0;c[j]!='\0';j++)
{
printf("%s",c);
}
printf("\n 1 ");
}
getch();
}
i want to print above given 2d string array but this is not giving
correct output plz see the code and explain me the coreect way to
print 2d char array.