how to convert an char array to decimal array

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


Please Help Members By Posting Answers For Below Questions

#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

720


the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function

762


List some of the static data structures in C?

762


Who is the main contributor in designing the c language after dennis ritchie?

553


What are linked lists in c?

651






What is the use of f in c?

559


What are the data types present in c?

629


Describe explain how arrays can be passed to a user defined function

605


What is a function in c?

572


What does == mean in texting?

665


What does sizeof return c?

605


what is the difference between 123 and 0123 in c?

722


Place the #include statement must be written in the program?

572


Is c still relevant?

639


What are two dimensional arrays alternatively called as?

661