Write an algorithm for a program that receives an integer as
input and outputs
the product of of its digits. E.g. 1234 = 24, 705 = 0

Answer Posted / pavithra

jus use an array to store d i/p
nd multiply the array elements

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is event driven programming or procedural programming, better within specific scenario?

2192


main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }

1170


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1014


Linked lists -- can you tell me how to check whether a linked list is circular?

875


What does sizeof return c?

834


What is equivalent to ++i+++j?

882


What are the various types of control structures in programming?

840


What is s or c?

818


What is the scope of static variable in c?

751


Explain what is the benefit of using enum to declare a constant?

852


Why do some versions of toupper act strangely if given an upper-case letter?

866


What are run-time errors?

856


What is the use of #include in c?

841


c language interview questions & answer

1722


Write a code to remove duplicates in a string.

853