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

Why is extern used in c?

0 Answers  


What is strcmp in c?

0 Answers  


write a program to delete an item from a particular location of an linear array?

1 Answers  


What is the difference between exit() and _exit() function?

0 Answers  


Which is the best website to learn c programming?

0 Answers  


#define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }

14 Answers   CDAC, GATE, NDS, TCS,


Is null valid for pointers to functions?

0 Answers  


Explain a file operation in C with an example.

0 Answers   Amdocs,


How can you restore a redirected standard stream?

0 Answers  


Binary tree traversing

1 Answers   Qualcomm,


Explain pointers in c programming?

0 Answers  


What does the message "warning: macro replacement within a string literal" mean?

1 Answers  


Categories