Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
C C-Loops & Control Statements C

A nested loop puzzle

Which of the following two code segments is faster? Assume that compiler makes no optimizations. /* FIRST */ for(i=0;i<10;i++)   for(j=0;j&l...
C C++ Recursion

How will you print numbers from 1 to 100 without using loop?

If we take a look at this problem carefully, we can see that the idea of “loop” is to track some counter value e.g. “i=0” till “i &...
C C-String C

How to find length of a string without string.h and loop in C?

Find the length of a string without using any loops and string.h in C. Your program is supposed to behave in following way: Enter a string: GeeksforGeeks (Say user e...
C++ School Programming C Basics

Loops in C and C++

Loops in programming comes into use when we need to repeatedly execute a block of statements. For example: Suppose we want to print “Hello World” 10 tim...
Articles GBlog Misc

OOPs Object Oriented Design

Object oriented design started right from the moment computers were invented. Programming was there, and programming approaches came into the picture. Programming is ...

Range-based for loop in C++

Range-based for loop in C++ is added since C++ 11. It executes a for loop over a range. Used as a more readable equivalent to the traditional for loop operating over ...
C C++ Recursion

Print 1 to 100 in C++, without loop and recursion

Following is a C++ program that prints 1 to 100 without loop and without recursion. #include <iostream> using namespace std;    template&lt...
C C++ c-puzzle

Print a number 100 times without using loop, recursion and macro expansion in C?

It is possible to solve this problem using loop or a recursion method. And we have already seen the solution using #define directive (Macro expansion) but what if al...
C++ interview-preparation placement preparation

Commonly Asked OOP Interview Questions Set 1

What is Object Oriented Programming? Object Oriented Programming (OOP) is a programming paradigm where the complete software operates as a bunch of objects talking to...
C# CSharp-Basics

Loops in C#

Looping in programming language is a way to execute a statement or a set of statements multiple number of times depending on the result of condition to be evaluated t...

Subscribe to Our Newsletter