/*display the character of string*/ #include void main() { char s[10]; int i=0; printf("\n\t enter a string"); gets(s); while(s[i]!=NULL) { printf("\n\t s[%d]=%c",i,s[i]); i++; } }
/*display the string by character to character*/ #include #include void main() { char s[8]="SKNSCOE"; int i=0; while(s[i]!=NULL) { printf("\n\t s[%d]=%c",i,s[i]); i++; } }
//display the content of string charecter by charecter #include #include void main() { char str[8]="sknscoe"; int i=0; while (str[i]!=NULL) { printf("str[%d]=%c\n",i,str[i]); i++; } }
/*gets(),put(s)*/ #include #include #include void main() { char str[10]; printf("\n\t enter the string"); gets(str); printf("Your college name is"); puts(str); }
#include
ReplyDelete#include
void main()
{
char str[8]="sknscoe";
int i=0;
while (str[i]!=NULL)
{
printf("str[%d]=%c\n",i,str[i]);
i++;
}
}
#include
ReplyDelete#include
void main()
{
char str[8]="krishna";
int i=0;
while (str[i]!=NULL)
{
printf("\n\t str[%d]=%c",i,str[i]);
i++;
}
}
/*display the character of string*/
ReplyDelete#include
void main()
{
char s[10];
int i=0;
printf("\n\t enter a string");
gets(s);
while(s[i]!=NULL)
{
printf("\n\t s[%d]=%c",i,s[i]);
i++;
}
}
/*Display content of string*/
ReplyDelete#include
#include
void main()
{
char s[8]="SKNSCOE";
int i=0;
while(s[i]!=NULL)
{
printf("\n\ts[%d]=%c",i,s[i]);
i++;
}
}
/*display the string by character to character*/
ReplyDelete#include
#include
void main()
{
char s[8]="SKNSCOE";
int i=0;
while(s[i]!=NULL)
{
printf("\n\t s[%d]=%c",i,s[i]);
i++;
}
}
//display the content of string charecter by charecter
ReplyDelete#include
#include
void main()
{
char str[8]="sknscoe";
int i=0;
while (str[i]!=NULL)
{
printf("str[%d]=%c\n",i,str[i]);
i++;
}
}
//initialization n display its content
ReplyDelete#include
#include
void main()
{
char str[10]="sknscoep";
int i=0;
while(str[i]!=NULL)
{
printf("\nstr[%d]=%c",i,str[i]);
i++;
}
#include
ReplyDelete#include
void main()
{
char str[8]="sknscoe";
int i=0;
while (str[i]!=NULL)
{
printf("\nstr[%d]=%c",i,str[i]);
i++;
}
}
#include
ReplyDelete#include
void main()
{
char str[8]="sknscoe";
int i=0;
while (str[i]!=NULL)
{
printf("str[%d]=%c\n",i,str[i]);
i++;
}
}
/*gets(),put(s)*/
ReplyDelete#include
#include
#include
void main()
{
char str[10];
printf("\n\t enter the string");
gets(str);
printf("Your college name is");
puts(str);
}
#include
ReplyDelete#include
void main()
{
char str[8]="sknscoe";
int i=0;
while (str[i]!=NULL)
{
printf("str[%d]=%c\n",i,str[i]);
i++;
}
}
/*Display string character by character*/
ReplyDelete#include
void main()
{
char str[]="WELCOME";
int i=0;
while(str[i]!=NULL)
{
printf("\n\tstr[%d]=%c",i,str[i]);
i++;
}
}
#include
ReplyDeletevoid main()
{
char str[8]="sknscoe";
int i=0;
while (str[i]!=NULL)
{
printf("str[%d]=%c\n",i,str[i]);
i++;
}
}
/* inilization & display string */
ReplyDelete#include
#include
#include
void main()
{
char str[10]="sknscoe";
int i=0;
while(str[i]!=NULL)
{
printf("\nstr[%d]=%c",i,str[i]);
i++;
}
}
#include
ReplyDelete#include
void main()
{
FILE *fp;
char str[10];
fp=fopen("abc.txt","a");
if(fp==NULL)
{
printf("can't open a file");
exit(1);
}
printf("\n\t enter a string");
scanf("%s",str);
fputs(str,fp);
fclose(fp);
}