Write a java program to find sum of digits of a number. Given an input number, we have to write a java code to calculate sum of digits of a number.
For example –
Input : 256
Output : 13 (2+5+60
Input : 15
Output : 6 (1+5)
MCQ on stack and queue data structure. The concept of Stack and Queue data structure is very important in computer science. In my previous post i have discussed following things.
Stack program in C using Array.
Queue data structure and their implementation.
The purpose of this objective questions is to test how well you understand the concept of stack and queue.