C Program to Print the Square of Array Elements

C Program to Input an Array, Store the Squares of these Elements in an Array & Print it Problem Description This is a C program which inputs array & stores the squares of these elements in an array & print them. Problem Solution 1. Create a two-dimentional array of define its elements statically. 2. Run … Read more

advertisement

C Program to Segregate 0s and 1s in an Array

This C Program segregates 0s on left side & 1s on right side of the array. Here is source code of the C Program to segregate 0s on left side & 1s on right side of the array. The C program is successfully compiled and run on a Linux system. The program output is also … Read more

advertisement

C Program to Find the Largest Sum of Contiguous Subarray of an Array

This is a C Program to find the sum of contiguous subarray within a 1 – D array of numbers which has the largest sum. Problem Description We have to write a program in C such that the program will find the sum of contiguous subarray within a 1 – D array of numbers (one-dimensional … Read more

advertisement

C Program to Find the Number of Elements in an Array

This is a C Program to find the number of elements in an array. Problem Description This C Program finds the number of elements present in the given array. Problem Solution 1. Create an array along with the definition of all its elements. 2. Create a variable which will hold the size of the array. … Read more

advertisement

C Program to Find Largest Element in an Array

An array is a data structure containing a collection of values or variables. The simplest type of array is a linear array or one-dimensional array. An array can be defined in C with the following syntax: int Arr[5] = {12, 56, 34, 78, 100}; /* here 12,56,34,78,100 are the elements at indices 0,1,2,3,4 respectively */ … Read more

advertisement

C Program to Find the kth Element in an Array

This is a C program to print the kth element in the array. Problem Description This C Program implements an array prints the kth element in the array where the position k is entered by the user as an input. Problem Solution 1. Create an array and taking its size from the users, define all … Read more

advertisement

C Program to Print all Repeated Elements with Frequency in an Array

This is a C Program to print all the repeated numbers with frequency in an array. Problem Description This C Program print all the repeated numbers with frequency in an array. Problem Solution Prints the repeated numbers with frequency in a given array as shown in the program below. Program/Source Code Here is source code … Read more

advertisement

C Program to Print Even and Odd Numbers in an Array

Odd Number: A number is said to be an odd number if it is not completely divisible by 2. In other words, if a number is divided by 2 and the remainder is 1, it is said to be an odd number. Example: 23, 19 Even Number: A number is said to be an even … Read more

advertisement

C Program to Generate Pascal Triangle using 1 D Array

This C Program generates pascal triangle 1 dimensional array. Here is source code of the C Program to generate pascal triangle 1 dimensional array. The C program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C Program to Generate Pascal Triangle 1 D Array */#include <stdio.h> void main(){ … Read more

advertisement

C Program to Split the Array and Add First Part to the End

This is a C Program to Split an Array from Specified Position & Add First Part to the End. Problem Description This program will split an array from specified position & add first part to the end. This program first accepts an array. Then splits an array according to the user specification. Now it becomes … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.