C program to find out the largest sequence of consecutive one from a string
Problem Description: Suppose, A string(maximum length is 100) of 1’s and 0’s are provided to you. your task is simple […]
Problem Description: Suppose, A string(maximum length is 100) of 1’s and 0’s are provided to you. your task is simple […]
Problem Description: Suppose you have an integer number ‘N’ full of only one and zero. Your task is to find
Bubble Sort Explanation: You can see the video for explanation of bubble sort. https://www.youtube.com/watch?v=sA4J928fj0k&t=148s Source Code: #include<bits/stdc++.h> int main() {
Input How factorial works by using recursion 5 factorial(5) =5*factorial(5-1) =5*factorial(4) =5*{4*factorial(4-1)} =5*4*factorial(3) =5*4*{3*factorial(3-1)} =5*4*3*factorial(2) =5*4*3*{2*factorial(2-1)} =5*4*3*2*factorial(1) =5*4*3*2*{1*factorial(1-1)} =5*4*3*2*1*factorial(0) =5*4*3*2*1*{1}
Source Code: /*C program to swap two numbers using pointers.*/#include<stdio.h> // function : swap two numbers using pointersvoid swap(int *a,int