Answer Posted / yogesh
#include<stdio.h>
int main()
{
char str[40],*s;
char ch,ask;
do
{
s=str;
printf("Enter the string:");
fgets(str,40,stdin);
do
{
printf("%d ",*s++);
}while(*s);
printf("\nDo u want to enter another string
(y/n):");
ask=getchar();
if(ask=='n')
break;
}while((ch=getchar())!='n');
printf("\n");
}
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How can I sort a linked list?
Explain what are linked list?
How many bytes are occupied by near, far and huge pointers (dos)?
What is a nested loop?
How can I do serial ("comm") port I/O?
Why is sprintf unsafe?
When can a far pointer be used?
What is the maximum length of an identifier?
What is the use of structure padding in c?
What is the g value paradox?
How does struct work in c?
Are pointers integers in c?
How can I get the current date or time of day in a c program?
difference between Low, Middle, High Level languages in c ?
What is the difference between array and pointer?