/* PROGRAM TO DISPLAY THE CONTENT OF STRING*/ # include # include void main( ) { char str[8]="Welcome"; int i=0; printf("\n Your Entered string is %s",str); printf("\n Character stored at each location are:\n"); for(i=0;i<=6;i++) { printf("str[%d]=%c\n", i,str[i]); } }
// display array of string
ReplyDelete#include
#include
void main()
{
char name[3][6]={"skn","scoe","korti"};
int i=0;
for(i=0;i<=2;i++)
{
printf("\n\t %s",name[i]);
}
}
//array of string initialize n display it
ReplyDelete#include
#include
void main()
{
int i=0;
char name[3][6]={"skn","scoe","korti"};
for(i=0;i<=2;i++)
{
printf("\n%s",name[i]);
}
}
/*array of pointer*/
ReplyDelete#include
void main()
{
char name[3][6]={"skn","scoe","korti"};
int i=0;
for(i=0;i<=2;i++)
{
printf("\n\t %s",name[i]);
}
}
/* PROGRAM TO DISPLAY THE CONTENT OF STRING*/
ReplyDelete# include
# include
void main( )
{
char str[8]="Welcome";
int i=0;
printf("\n Your Entered string is %s",str);
printf("\n Character stored at each location are:\n");
for(i=0;i<=6;i++)
{
printf("str[%d]=%c\n", i,str[i]);
}
}
/*gets &puts function*/
ReplyDelete#include
#include
#include
void main()
{
char str[10];
puts("Enter string");
gets(str);
puts("string is:");
puts(str);
}
/*display array of string*/
ReplyDelete#include
void main()
{
char str[3][6]={"skn","scoe","korti"};
int i;
for(i=0;i<=2;i++)
{
printf("%s",str[i]);
}
}
/* display array of string*/
ReplyDelete#include
#include
void main()
{
char name[3][6]={"skn","scoe","korti"};
int i=0;
for(i=0;i<=2;i++)
{
printf("\n\t %s",name[i]);
}
}