Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to convert an char array to decimal array

Answer Posted / raj

main()
{
int a[5];
char c[5]={'1','2','3','4','5'};
int i;
for(i=0;i<5;i++)
a[i]=c[i]-'0';
for(i=0;i<5;i++)
printf("%d ",a[i]);
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program of advanced Fibonacci series.

1094


Why do we need arrays in c?

1085


What is getch () for?

1149


Write a program to check palindrome number in c programming?

963


What is strcpy() function?

1087


Is there any possibility to create customized header file with c programming language?

1004


How can a program be made to print the line number where an error occurs?

1036


write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.

2815


Should a function contain a return statement if it does not return a value?

1017


plz let me know how to become a telecom protocol tester. thank you.

2140


Define macros.

1223


can anyone suggest some site name..where i can get some good data structure puzzles???

2018


how to execute a program using if else condition and the output should enter number and the number is odd only...

2207


What is structure of c program?

1078


What does *p++ do? What does it point to?

1004