how to multiply two number taking input as a string
(considering sum and carry )
Answers were Sorted based on User's Feedback
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 |
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 |
Why is extern used in c?
What is strcmp in c?
write a program to delete an item from a particular location of an linear array?
What is the difference between exit() and _exit() function?
Which is the best website to learn c programming?
#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?
Explain a file operation in C with an example.
How can you restore a redirected standard stream?
Binary tree traversing
Explain pointers in c programming?
What does the message "warning: macro replacement within a string literal" mean?