Sunidhi Bansal has Published 1078 Articles

C Program to convert a given number to words

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 10:45:22

12K+ Views

Given a string consisting of numerical values, the task is to covert those given numbers in words.Like we have an input “361”; then the output should be in words i.e, ” Three hundred sixty one”. For the solution of the following problem we have to keep in mind the numbers ... Read More

Printing all subsets of {1,2,3,…n} without using array or loop in C program

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 10:27:55

1K+ Views

Given a positive integer n we have to print all the subsets of a set of {1, 2, 3, 4, … n} without using any array or loops.Like we have given any number say 3 s we have to print all the subset in the set {1, 2, 3} which ... Read More

Program to check Strength of Password in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 10:14:56

7K+ Views

Given a string input containing password characters, the task is to check the strength of the password.The strength of the password is when you tell that the password is whether easily guessed or cracked. The strength should vary from weak, average and strong. To check the strength we have to ... Read More

Program to Convert Hexadecimal to Octal in C program

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 10:05:51

2K+ Views

We are given a Hexadecimal number as string; the task is to convert it to the Octal. To convert a hexadecimal number to octal, we have to −Find the binary equivalent to the hexadecimal number.Convert the binary number to Octal.What are hexadecimal numbersHexadecimal numbers are the numbers which are of ... Read More

C Program to check if a number is divisible by any of its digits

Sunidhi Bansal

Sunidhi Bansal

Updated on 21-Oct-2019 11:59:18

2K+ Views

Given a number n, task is to find that any of the digit in the number divides the number completely or not. Like we are given a number 128625 is divisible by 5 which is also present in the number.ExampleInput: 53142 Output: yes Explanation: This number is divisible by 1, ... Read More

C Program for product of array

Sunidhi Bansal

Sunidhi Bansal

Updated on 21-Oct-2019 11:53:57

10K+ Views

Given an array arr[n] of n number of elements, the task is to find the product of all the elements of that array.Like we have an array arr[7] of 7 elements so its product will be likeExampleInput: arr[] = { 10, 20, 3, 4, 8 } Output: 19200 Explanation: 10 ... Read More

C Program for Arrow Star Pattern

Sunidhi Bansal

Sunidhi Bansal

Updated on 21-Oct-2019 11:49:31

2K+ Views

Given a number n and we have to print the arrow star pattern of maximum n number of stars.The star pattern of input 4 will look like −ExampleInput: 3 Output:Input: 5 Output:The approach used below is as follows −Take input in integer.Then print n spaces and n stars.Decrement till n>1.Now ... Read More

C Program for subtraction of matrices

Sunidhi Bansal

Sunidhi Bansal

Updated on 21-Oct-2019 11:42:24

1K+ Views

Given two matrices MAT1[row][column] and MAT2[row][column] we have to find the difference between two matrices and print the result obtained after subtraction of two matrices. Subtraction of two matrices are MAT1[n][m] – MAT2[n][m].For subtraction the number of rows and columns of both matrices should be same.ExampleInput: MAT1[N][N] = { {1, ... Read More

C Program to check if an array is palindrome or not using Recursion

Sunidhi Bansal

Sunidhi Bansal

Updated on 21-Oct-2019 11:35:40

1K+ Views

Given an array arr[n] where n is some size of an array, the task is to find out that the array is palindrome or not using recursion. Palindrome is a sequence which can be read backwards and forward as same, like: MADAM, NAMAN, etc.So to check an array is palindrome ... Read More

C Program to check if a number is divisible by sum of its digits

Sunidhi Bansal

Sunidhi Bansal

Updated on 21-Oct-2019 11:28:40

2K+ Views

Given a number n we have to check whether the sum of its digits divide the number n or not. To find out we have to sum all the numbers starting from the unit place and then divide the number with the final sum.Like we have a number “521” so ... Read More

Advertisements