how to multiply two number taking input as a string
(considering sum and carry )

Answer Posted / vengat

int i, b;
char a[4] = "63";
for (i = 0;i < 1;i++)
{

b = (a[i] - 48)+(a[i+1]-48);
printf("%d\n", b);
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is wrong with this code?

700


What is the purpose of clrscr () printf () and getch ()?

605


What is the use of in c?

583


What is the ANSI C Standard?

782


What is string constants?

664






What is the difference between new and malloc functions?

584


What is || operator and how does it function in a program?

635


Tell me can the size of an array be declared at runtime?

602


Explain how can a program be made to print the name of a source file where an error occurs?

693


What are the differences between new and malloc in C?

612


Is this program statement valid? INT = 10.50;

691


Write a program that accept anumber in words

1256


What is a pointer on a pointer in c programming language?

624


can we change the default calling convention in c if yes than how.........?

2037


write a c program in such a way that if we enter the today date the output should be next day's date.

1685