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
What are called c variables?
Where static variables are stored in memory in c?
What is structure data type in c?
What is unary operator?
How pointers are declared?
I heard that you have to include stdio.h before calling printf. Why?
how can f be used for both float and double arguments in printf? Are not they different types?
What is the difference between fread buffer() and fwrite buffer()?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
What are local static variables? How can you use them?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
How can I manipulate strings of multibyte characters?
Write a program to print factorial of given number using recursion?
Explain what is the most efficient way to store flag values?