Category Archives: C++

Program Create Phone Record File

Program Create Phone Record File – Write a C++ program to input phone records and write into phone file. The program will ask the user “Do you want to add more records (y/n) ?. It will input phone records as long as the user will enter a ‘y’. Source Code #include <iostream> #include <fstream> using… Read More »

Loading

Pointer Program Maximum Array Number

Pointer Program Maximum Array Number: Write a C++ program to input 5 numbers in array. Find maximum number in array using pointer notation. Source Code Pointer Program Maximum Array Number Let’s go through the C++ program line by line: #include <iostream> This line includes the standard input-output stream library, which provides functionalities for input and… Read More »

Loading

Create Linux ls command C Program

Create Linux ls command C Program – Write a C program under Windows Operating System to create or simulate linux ls command.   Program code #include<stdio.h> #include<dirent.h> int main(int argc, char **argv) { DIR *dp; struct dirent *link; dp=opendir(argv[1]); printf(“\n contents of the directory %s are \n”, argv[1]); while((link=readdir(dp))!=0) printf(“%s\n”,link->d_name); closedir(dp); } Output contents of… Read More »

Loading

SJF Scheduling Algorithm Program Operating System LAB

SJF Scheduling Algorithm Program – Operating System Practicals LAB. Write a C Program to input burst times of N processes and find the Waiting times and Turn around times using SJF – Shortest Job First Scheduling Method in Operating system. Program Code #include<stdio.h> int main() { int bt[20],p[20],wt[20],tat[20],i,j,n,total=0,pos,temp; float avg_wt,avg_tat; printf(“Enter number of process:”); scanf(“%d”,&n);… Read More »

Loading

FCFS Scheduling Algorithm Program in C++

FCFS Scheduling Algorithm Program in C++ : Write a C++ Program To Calculate Average Waiting Time and Average Turn Around Time using FCFS. Program Code: FCFS Scheduling Algorithm Program in C++ We shall use the loop concept and the use of arrays to solve this programming assignment. First of all we will define some variables… Read More »

Loading

Function Array Search in C Plus Plus

Function Array Search in C Plus Plus. This is a C Plus Plus programming language program to input size of an array of integer numbers. The program will take item from the user to be searched in this array. If it finds the specified element in array, a suitable message of Item found on location… Read More »

Loading

Array Numbers Factorials in C++

Array Numbers Factorials in C++. This is a C++ program using arrays and loops. This program will input five numbers in array. It will find factorials of each element of array and place them in a second array. How This C++ Program Works? 1. First of all declare required arrays and variables. int a[5],b[5],i,n,c; long… Read More »

Loading

Flowcharts With Examples in Programming

Topic: Flowcharts With Examples and Explanation of Symbols Task: Today we will discuss the Role of Flowcharts in Computer Programming – Tutorial for Beginners. This is a basic tutorial on how to draw some basic flow charts to be used in computer program planning process. There will be an introduction to basic symbols needed to… Read More »

Loading