12 Parent process sorts an Array and passes the sorted array to child process using command line argument of EXECVE System Call for Search Element in C

Program Main.c: // COMPILE : gcc main.c -o // EXECUTE : ./a.out #include <stdio.h> #include <stdlib.h> #include <unis...
Read More

11 Implement the C program in which main program accepts an integer array. Main program uses the FORK system call to create a new process called a child process. Parent process sorts an integer array and passes the sorted array to child process through the command line arguments of EXECVE system call. The child process uses EXECVE system call to load new program which display array in reverse order.

Program Parent.c: #include<stdio.h> #include<stdlib.h> #include <string.h> void bubbleSort(int arr[],int n) { ...
Read More

10 Program to Demonstrate EXECVE System Call in C

Program Main.c: #include <stddef.h> #include <unistd.h> void main() { char* arg_list[] = { "myprog", "...
Read More

8 Demonstrating Zombie State in C

Program: #include<stdio.h> void main() { int cpid = fork(); if(cpid >0) { printf("\n\n Parent is Running...
Read More

7 Demonstrating Orphan State in C

Program: #include<stdio.h> void main() { int cpid = fork(); // printf("%d",cpid); if(cpid > 0) { ...
Read More

6 Creation of Child Process using fork() in C

Program: #include<stdio.h> void main() { int cpid = fork(); if(cpid == 0) { printf("\n\n Child is running:\...
Read More

Address Book in Shell Script

Program: #!/bin/bash file_name="address-book.txt" line() { printf "\n**********************************************\n&q...
Read More

5 Script to Check File is Present or Not

Program: #!/bin/bash file_name=abc.txt if [ -e $file_name ] then echo "File is Present" else echo "No File is Present...
Read More

4 Switch Case in Shell Script

Program: #!/bin/env echo "Program to demonstrate Switch Case:"; printf "Enter a Number: "; read num case $num in ...
Read More

3 While Loop in Shell Script

Program: #!bin/bash echo " Program to Demonstrate While Loop:"; printf " Enter a Number: "; read num i=0 while [ $i...
Read More

2 Max of 2 Number in Shell Script

Program: #!/bin/bash echo "Program to Check max Num:"; echo "Enter a Number:"; read s1; echo "Enter a Number:&qu...
Read More

1 Addition of Two Number in Shell Script

Program: #!/bin/bash echo -n "Enter the first number : " read num1 echo -n "Enter the second number : " read nu...
Read More