C String Program Remove Blank Spaces

C Program Remove Blank Spaces from a given string entered by the user at run time. Code /* C Program to removing blank spaces from string easyCodeBook.com */ #include <stdio.h> int main() { char str1[100], str2[100]; int i, j, size = 100; printf(“Enter a string to remove spaces:\n”); gets(str1); j=0; for(i=0; str1[i] != ‘\0’; i++)… Read More »

Loading

Draft – Index of Programming tutorials

Draft – Accidentally published this Draft. But seeing interest of viewers / readers I am presenting a list of main pages in this website EasyCodeBook.com Perfect Programming Tutorials: Python, Java, C++, C … 100 + Important C Programs for Beginners HOME BASIC JAVA PROGRAMS PERFECT PYTHON TUTORIAL LEARN C PROGRAMMING BASIC C++ PROGRAMS IMPORTANT C… Read More »

Loading

Python Different Counts in String

Python Different Counts in String – Python program to count uppercase letters, lower case letters, vowels, consonants and spaces in the given string.   #Python program to count upper case letters, lower case letters #vowels, consonants and spaces in a string uppercase=0 lowercase=0 vowels=0 consonants=0 spaces=0 string=input(“Enter a String: “) for ch in string: if… Read More »

Loading

Python Program Check Positive Number

Python Program Check Positive Number – Write a Python program to input a number and check whether the given number is positive, negative or zero. Use Python if-elif-else construct. Python Program Check Positive, Negative or Zero Number # Python program to check a number # for positive, negative or zero num = int(input(‘Enter a number:… Read More »

Loading

Python Square Root Program

Python Square Root Program – Write a Python Program To find Square root of a number. Three Python programs to find square root of a number using Python. Code of Python Square Root Programs Program 1:Use Exponentiation Operator Exponentiation Operator ** in Python is used to raise the first operand/number to power of second number.… 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

Using Linux System Calls Program Operating Systems Lab

Using Linux System Calls Program Operating Systems Lab – Write a C program Using Linux System Calls Program to create a child process using fork() system call. Display suitable message about parent process ID, child process or Error message if child process could not be created. Program Code using fork() getpid() and exit() #include<stdio.h> #include<unistd.h>… 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