Posts

Showing posts from November, 2022

Os p

 Fcfs // FCFS #include<stdio.h> #include<stdlib.h> int addrq(); int selectionjob(); int deleteq(int); int fsahll(); struct job{  int atime; //arraival time.  int btime; //brust time.  int ft; //finish time.  int tat; //Trun around time.  int wt; // waiting time. }p[10]; int arr[10],brust[10],n,rq[10],no_rq=0,time=0; int main(){  int i,j;  printf("Enter the job/process number:");  scanf("%d",&n);  printf("\n");  for(i = 0;i<n;i++){   printf("Enter the arrival time p%d:",i);   scanf("%d",&p[i].atime); //Assigning the arrival time.   arr[i] = p[i].atime;  }  printf("\n");  for(i = 0;i<n;i++){  printf("The arrival time of p%d:",i);  printf("%d\n",p[i].atime); //Printing the arrival time. // arr[i] = p[i].atime;  }  printf("\n");  for(i = 0;i<n;i++){  printf("Enter the brust time p%d:",i);  scanf("%d",&p[i].btime); //Assigning the br...

Java Practical Programs Sem5

JAVA  PRACTICAL  ASSIGNMENT: ASSIGNMENT 1  SET - A Java Practical Prgram Assignment 1 /* Assignment 1 Set-A a) Using javap, view the methods of the following classes from the lang package: java.lang.Object , java.lang.String and java.util.Scanner, and also Compile sample program. Type the following command and view and view the bytecodes, javap -c MyClass. */ public class Ass1_SetA_a { int num; public Ass1_SetA_a() { num = 0; } public Ass1_SetA_a(int num) { this.num = num; } public static void main(String args[]) { Ass1_SetA_a obj1 = new Ass1_SetA_a(); if(args.length > 0) { int n = Integer.parseInt(args[0]); Ass1_SetA_a obj2 = new Ass1_SetA_a(n); System.out.println("Num of object first:"+obj1.num); System.out.println("Num of object second:"...