C++ Program to Get The List of Files From Given Directory

| Last Updated: | In: C++ Tutorial


Today, I am going to write a c++ program which will print the list of files from the given directory. I have used the opendir() function to open the given directory and readdir() function to read the directory. readdir() function read the given directory and display the lists of all files inside that directory. c++ …

C Program to Accept Paragraph as Input and Display Output

| Last Updated: | In: C Programming Tutorial


This c program will accept a paragraph of sentences as input on the execution time and print the output by using the scanf() function in C.. You can only enter the 150 characters of a paragraph while executing the program because I have set the limit of 150 characters only. If you want to change …

How to Create a New Directory in C Programming Language

| Last Updated: | In: C Programming Tutorial


In this tutorial, I am going to share a c program to create a new directory with the help of Linux command. You will also learn, how to use Linux command in c programming language. This program will check the existence of directory before creating it using the inbuilt function stat(). If the destination directory …

How to Print an Array in C Programming Language

| Last Updated: | In: C Programming Tutorial


This program will read an array and print that array as output. In this program, we have used the for loop to print all elements of an array. When you execute this program, It will ask to enter the number of array elements and then take elements as input and store in an array variable. …

C Program to Generate Random Number

| Last Updated: | In: C Programming Tutorial


This c program will generate the random numbers using rand() function. This is a very simple program. In this program, we have used for loop to generate multiple random numbers. As an example we print only the 10 numbers, you can generate as much you can by changing the number from 10 to as you …

C Program to Find the Largest Element From an Array

| Last Updated: | In: C Programming Tutorial


This is a c program to find the largest element from an array. We have used the for loop and if… statement to achieve the program goal. In this program, firstly the user will enter the number of array elements and then the numbers of elements. On the basis of entered array elements, we will …

C Program to Delete an Element From an Array

| Last Updated: | In: C Programming Tutorial


Below program will delete an element from an array using c programming language. Copy the below code and execute it with the help of turbo C. I have compiled & executed the below program. Please see the program output at the end of the program. If you want that, I will write any c program …

C Program to Find the Array Size

| Last Updated: | In: C Programming Tutorial


One c language student requested to write a program to find the size of an array so that I am writing this tutorial. In this program, we will share a c program which will calculate the size of an array. c program to find the array size In this program, we have used sizeof() function …

C Programming Interview Questions and Answers

| Last Updated: | In: C Programming Tutorial


Are you a C programming beginners, or just finished the learning of c programming language and looking for the job in c programming, then this tutorial will help you lot. Please keep your close attention in this tutorial as I am going to share some common c programming interview question with answers & example. c …

Selection Sort Program in C Programming Language

| Last Updated: | In: C Programming Tutorial


In this program, we will share the selection sort program in c programming language. Selection sort is a sorting algorithm, which is specifically known for its simplicity, and it has performance advantages. In this tutorial, we will sort the four elements (6, 9, 2, 8) with the help of selection sort. C program for selection …