Find Sum of Digits of a Number – Java Code

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)

Find Factorial of a Number in PHP using For Loop & Recursion

How to calculate factorial of a number in PHP. In this tutorial, You are going to learn how to write a PHP code to find factorial of a number using iterative as well as recursive approach. Before solving this problem let’s understand what is factorial?

Subscribe Our Tutorials

Get Latest Updates on Facebook

Program to Print Factorial of a Number in PHP

Program to Print Factorial of a Number in PHP

MCQ on Stack and Queue – Data Structure Practice Questions

MCQ on stack and queue data structure. A Stack and Queue data structure is very important in computer science. In this tutorial, you are going to learn about stack and queue data structure. Also you’ll find MCQ on stack and queues.

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.

Pre-increment Vs Post-increment Operators- MCQ for Practice & Explanation

Pre-increment Vs Post-increment operators. What’s the difference between pre-increment (++i) and post-increment (i++) operators.  In this post, we’ll learn how pre-increment and post-increment operators work in programming.

In this post, You’ll find MCQ which will help you to understand this concept fully.

Yii Framework Tutorial-How to Install and Setup Yii Framework

Yii is a very high performance PHP framework used for development of web applications. It’s free and open-source framework which follows MVC architecture.So now you might be thinking that there is many other PHP MVC framework like Laravel, Symfony, Cake, Codeigniter etc. are available why i use yii framework.The best thing about Yii’s is it’s performance. Definitely If you are making highly-scalable web application then you can’t ignore this point.

MCQ on Recursion – Recursion Objective Questions for Practice

MCQ on Recursion

Recursion is the most important concept in computer science. In this tutorial, You’ll find practice questions related to recursion.

Recursion video tutorials

In my previous posts, i have written about binary search implementation using recursion and difference between recursion and iteration.

These MCQ helps you to understand the concept of Recursion.

1) Which Data Structure is used to perform Recursion?

a) Queue
b) Stack
c) Linked List
D) Tree