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 does placing some code lines between the comment symbol help in debugging the code?
What type of function is main ()?
Explain what does the function toupper() do?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
why we wont use '&' sing in aceesing the string using scanf
In C language, a variable name cannot contain?
List the difference between a "copy constructor" and a "assignment operator"?
Explain what is the difference between functions abs() and fabs()?
How can I write functions that take a variable number of arguments?
What is the difference between procedural and declarative language?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
How many parameters should a function have?
Is c compiled or interpreted?
Can two or more operators such as and be combined in a single line of program code?