Google Add

Search

C Program to Insert an Element in an Array

Write a c program to insert an element in an array. In this tutorial, we are going to write a c program which insert an element in an array at a given index.

This question is also very important in terms of an interview.

In this program, we are going to write a c code which takes an input array, position and value of a new element from a user and insert it at a specified position.

For example -

Input array - {4, 3, 1, 5}

Input position - 3

New element - 7

After inserting an element - {4, 3, 7, 1, 5}

Find Smallest Number in Array - C, C++ Code

C, C++ Program to Print Smallest Element of an Array
C, C++ Program to Print Smallest Element of an Array
Write a C, C++ program to find smallest number in an array. Given an unsorted array, we have to write a code to print smallest number of an array.

To understand this problem,  Let's take an array arr[] = {3, 4, 1, 5, 6}. The smallest number in an array is 1.

Now the question is how to solve this problem. You can use multiple approaches to solve this problem.

C Program to Find Largest of Three Numbers using Ternary Operator

Write a C program to find largest of three numbers using ternary operator. Given three input numbers, we have to write a code to find largest of three numbers using ternary operator.

Program to Print Hello World without using Semicolon - C, C++ Code

Write a C, C++ program to print hello world without using semicolon. In this tutorial, we are going to write a program which will print hello world using if-else, while and switch statements.

In c, c++ programming language every line ends with a semicolon, so it seems tricky how do you use printf  in C and cout in C++ without semicolon.

Java Program to Count Number of Digits in a Number

Write a Java program to count number of digits in a number. In this program, We take a number as an input and print the count of digit in a number.

Java Program to Count Number of Digits in a Number