Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Arrays Backtracking Hash

Given an array A[] and a number x, check for pair in A[] with sum as x

Write a program that, given an array A[] of n numbers and another number x, determines whether or not there exist two elements in S whose sum is exactly x. ...

Why variable name does not start with numbers in C ?

In C, apart from keywords everything in the C program is treated as Identifier. Identifier can be the names given to variables, constants, functions and user-defined ...
Arrays Paytm Paytm

Find the minimum distance between two numbers

Given an unsorted array arr[] and two numbers x and y, find the minimum distance between x and y in arr[]. The array might also contain duplicates. You may assume tha...
C C-Operators C

Modulus on Negative Numbers

What will be the output of the following C program? #include <stdio.h> int main() {    int a = 3, b = -8, c = 2;    ...
Arrays Amazon Amazon

Find the maximum repeating number in O(n) time and O(1) extra space

Given an array of size n, the array contains numbers in range from 0 to k-1 where k is a positive integer and k <= n. Find the maximum repeating number in this arr...
C C-Functions C

How to Count Variable Numbers of Arguments in C?

C supports variable numbers of arguments. But there is no language provided way for finding out total number of arguments passed. User has to handle this in one of th...
C c-puzzle C

C Program to print numbers from 1 to N without using semicolon?

How to print numbers from 1 to N without using any semicolon in C. #include<stdio.h> #define N 100    // Add your code here to print number...
C Mathematical C-Operators

To find sum of two numbers without using any operator

Write a program to find sum of positive integers without using any operator. Only use of printf() is allowed. No other library function can be used. Solution It&#x20...
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 &...
Arrays Linked List Accolite

Add two numbers represented by linked lists Set 2

Given two numbers represented by two linked lists, write a function that returns sum list. The sum list is linked list representation of addition of two input numbers...

Subscribe to Our Newsletter