Question: Write a C program that uses a 20-element integer array to store integers as large as 20-digits each. Your code will only deal with

Write a C program that uses a 20-element integer array to store

Write a C program that uses a 20-element integer array to store integers as large as 20-digits each. Your code will only deal with positive integers. Read the large integer in one line as a single input (ASCII code of character '0' is 48, character '1' is 49, character 2' is 50 and continue in this manner). Write the program that inputs two large integers (you may use library functions) (the number of digits should be less than or equal to 20 digits) and computes and prints the sum of those integers. Note 1: char a='2"; char b='0'; int i; i-a-b; i gets the value 2 Note 2: For example, we are using 21-element integer array and user entered 387567234512345248. The representation of that integer in your code should be: a[0] a[1] a[20] 0003 8 7 5 6 72 3 4 5 1 2 3 4 5248 Note 3: Assume that if both of your integers are 20 digit, the sum of those integers is 20 digit, but in other cases result may contain different number of digits. Sample Input1: 3875 67234512345248 Sample Output1: 511065 380001160971 123498145488815723 Sample Input2: 555666777888999333 Sample Output2: 1222444666000998999 666777888111999666 Sample Output3: 1676323445 455655 Sample Input3: 888444455556666 787878989898989

Step by Step Solution

3.45 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

include include int main int ijkl char txt120 char tx... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!