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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / ravi

char a[3];
int i;
char s[3];
for(i=1;i<=3;i++)
s[i]=a[i]*2;
printf("%s",s[i]);

Is This Answer Correct ?    5 Yes 18 No

Post New Answer

More C Interview Questions

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

2 Answers   Wipro,


what is the difference between declaration and definition of a variable or function ?

3 Answers  


why return type of main is not necessary in linux

0 Answers   TCS,


Explain how do you override a defined macro?

0 Answers  


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

0 Answers  






while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

0 Answers  


What is a #include preprocessor?

0 Answers  


Can we change the value of #define in c?

0 Answers  


what is difference between array,strutter,union and pointers

3 Answers   CTS, Lovely Professional University, Mannar Company,


How do I initialize a pointer to a function?

2 Answers  


How to find the usage of memory in a c program

1 Answers   Infosys,


What does stand for?

0 Answers  


Categories