C Program to find the strong number.

Write a C Program to find the given number is strong or not?A number is called strong number if sum of the factorial of its digit is equal to number itself. Example: 145 since 1! + 4! + 5! = 1 + 24 + 120 = 145. Read more about C Programming Language . /************************************************************ …

C Program to find the two sets Intersection and Union

Write a C Program to find the two sets Intersection and UnionA Set is a collection of well defined and distinct objects.Intersection of two sets A and B is defined as, all the elements of set A, which are also elements of set B.Union of two sets A and B is defined as, all the …

K&R C Programs Exercise 4-8

Exercise 4-8. Suppose that there will never be more than one character of pushback. Modify getch and ungetch accordingly. The original K&R implementation uses an array buf[BUFSIZE] and an index bufp to support multiple pushed-back characters. If only one character of pushback is ever needed, the array becomes unnecessary. A single static int buf suffices …

K&R C Programs Exercise 4-6

Exercise 4-6. Add commands for handling variables. (It’s easy to provide for twenty-six variables with single-letter names.) Add a variable for the most recently printed value. Twenty-six variables map naturally to an array var[26] indexed by c – ‘a’. The protocol: a lowercase letter pushes its variable’s value; = assigns the top of the stack …

K&R C Programs Exercise 4-5

Exercise 4-5. Add access to library functions like sin, cos, exp, and pow. See <math.h> in Appendix B, Section 4. Math functions need the calculator to recognize words as well as single characters. getop currently returns one character at a time. The fix: if getop sees a letter, it reads the whole word into s[] …

C Program to implement Priority Queue using structure.

Data structures using C,Write a C Program to implement Priority Queue using structure.Priority QUEUE is a abstract data type in which the objects are inserted with respect to certain priority. In this program, we created the simple ascending order priority queue using the structure, here items are inserted in ascending order. Structure is a c …