Notes, summaries, assignments, exams, and problems for Primary education

Sort by
Subject
Level

FCFS and SJF CPU Scheduling C Program Example

Classified in Computers

Written on in English with a size of 3.03 KB

FCFS and SJF CPU Scheduling C Program Example

Corrected and formatted C source code for FCFS and SJF scheduling.

FCFS Scheduling C Implementation

#include <stdio.h>

int FCFS() {
    int bt[15], n, i, wt[15];
    float twt = 0, tat = 0, att, awt;
    printf("\nTHE FCFS SCHEDULING\n");
    printf("Enter the number of processes: ");
    scanf("%d", &n);
    printf("Enter burst time of all the processes:\n");
    for (i = 0; i < n; i++) {
        printf("P%d: ", i + 1);
        scanf("%d", &bt[i]);
    }

    wt[0] = 0;
    // for calculating waiting time of each process
    for (i = 1; i < n; i++)
        wt[i] = bt[i - 1] + wt[i - 1];

    printf("ProcessID\tBurstTime\tWaitingTime\tTurn Around Time\n");
    for (i = 0; i <
... Continue reading "FCFS and SJF CPU Scheduling C Program Example" »

Additive Manufacturing Technologies: Processes, Principles, and Applications

Classified in Technology

Written on in English with a size of 16.29 KB

Need for Additive Manufacturing (AM)

Additive Manufacturing (AM) is needed to overcome the limitations of conventional manufacturing methods such as machining, casting, and forming. Traditional processes involve material removal or complex tooling, resulting in high material wastage, long lead times, and increased production costs. AM builds components layer by layer directly from digital CAD data, eliminating the need for molds, dies, or fixtures. This enables rapid product development and faster time-to-market.

AM is particularly beneficial for producing:

  • Complex geometries and internal channels
  • Lattice structures and lightweight designs
  • Customized parts that are difficult or impossible to manufacture using conventional techniques
  • Functional integration

In... Continue reading "Additive Manufacturing Technologies: Processes, Principles, and Applications" »

Hehhrhrhr

Classified in Computers

Written on in English with a size of 9.2 KB

Sequential circuits are fundamental components of digital systems, defined by the fact that their output depends not only on the current inputs but also on the past history of inputs (i.E., their current state).
The most basic element of a sequential circuit is the Flip-Flop, which is a 1-bit memory cell.
Here is a detailed explanation of the basic Flip-Flops and their operation:
1. Latches vs. Flip-Flops
Both latches and flip-flops are 1-bit storage elements, but they differ in how they are controlled:
| Feature | Latch | Flip-Flop |
|---|---|---|
| Triggering | Level-triggered (Transparent) | Edge-triggered (Synchronous) |
| Control | Changes state as long as the Enable or Clock is HIGH (or LOW). | Changes state only at the rising edge or falling... Continue reading "Hehhrhrhr" »

"tax relationship" taxable event taxable person

Classified in Economy

Written on in English with a size of 10.64 KB

Here are the solutions to the questions presented in the images, based on the provisions of the Indian Income Tax Act, 1961.
Q. 2. Income Tax is charged on the Previous year Income. Do you agree? If not Give exceptions.
Agreement: Yes, I agree. The fundamental principle is that income earned in the Previous Year (P.Y.) is taxed in the next financial year, known as the Assessment Year (A.Y.).
Exceptions to the General Rule (P.Y. Income Taxed in P.Y.)
In certain specific cases, income is assessed and taxed in the same P.Y. Itself, primarily to ensure tax recovery:
 * Non-Resident Shipping Business (Sec. 172): To tax freight income before the ship leaves India.
 * Persons Leaving India (Sec. 174): Individuals leaving India with no intention of returning.... Continue reading ""tax relationship" taxable event taxable person" »

Powers and Functions of the President of India

Classified in Law & Jurisprudence

Written on in English with a size of 3.28 KB

Powers and Functions of the President of India

The President of India is the constitutional head of the Union and exercises powers either directly or through officers subordinate to him/her. Although the office is largely ceremonial, the President performs vital functions as provided by the Constitution.

1. Executive Powers

  • The President is the formal executive head, and all executive actions of the Government of India are taken in his/her name.
  • Appoints the Prime Minister, other Union Ministers, Governors of states, Attorney General of India, CAG, CEC and Election Commissioners, UPSC members, Finance Commission members, and Chiefs of the Armed Forces.
  • Administers Union Territories through appointed administrators.

2. Legislative Powers

  • Summons, prorogues,
... Continue reading "Powers and Functions of the President of India" »

Tax Provisions for Business and Other Income Sources

Classified in Economy

Written on in English with a size of 9.5 KB

Notes on Specific Tax Provisions

Preliminary Expenditure under Section 35D

Preliminary Expenditure refers to the expenses incurred by an assessee before the commencement of the business or after the commencement of the business in connection with the extension of the existing undertaking or the setting up of a new unit.

  • Nature of Expenditure: Since these expenses are incurred before the business starts generating revenue, they are typically capital in nature and would normally be disallowed as a deduction.
  • Purpose of Section 35D: This section allows a statutory deduction by amortizing the eligible preliminary expenses over a period of five years to encourage industrial growth and compensate promoters for the costs incurred in establishing a business.
... Continue reading "Tax Provisions for Business and Other Income Sources" »

Gas Power Plants: Operational Principles and Efficiency

Classified in Technology

Written on in English with a size of 2.05 KB

How Gas Power Plants Generate Electricity

Gas power plants are facilities that generate electricity using gas turbines based on the Brayton cycle, a thermodynamic process in which air undergoes compression, combustion, and expansion.

The Operational Process

Their operation begins when atmospheric air enters the compressor, where its pressure and temperature are increased. This compressed air then enters the combustion chamber, where it is mixed with natural gas or another gaseous fuel and burned, reaching extremely high temperatures. The resulting combustion gases expand through a turbine, which converts thermal energy into mechanical rotational energy. This mechanical energy drives an electric generator that produces electricity.

Key Advantages

... Continue reading "Gas Power Plants: Operational Principles and Efficiency" »

Global Energy Resources, Conversion, and Reserves

Classified in Geology

Written on in English with a size of 3.69 KB

Energy resources: renewable and non-renewable

Energy resources are classified into renewable and non-renewable.

Renewable resources

Renewable resources include solar, wind, geothermal, hydropower, biomass, and wave and tidal energy. They regenerate naturally and have a reduced environmental impact.

Non-renewable resources

Non-renewable resources include fossil fuels (hard coal, lignite, peat, petroleum, natural gas and oil shales) and nuclear fuels (uranium, thorium and plutonium), as well as fusion fuels (deuterium, tritium and lithium), whose resources are much larger than those of fossil fuels.

Forms of energy and conversion

Energy can appear in mechanical, electrical, thermal, chemical, solar or nuclear form, and it can be converted from one form... Continue reading "Global Energy Resources, Conversion, and Reserves" »

Mastering C Pointers, Structures, and Unions

Classified in Computers

Written on in English with a size of 8.51 KB

Pointers in C

A pointer is a variable that stores the memory address of another variable. They are essential in C for dynamic memory allocation, array manipulation, and implementing complex data structures.

1. Declaring and Initializing Pointers

A pointer variable must be declared to hold the address of a specific data type.

A. Declaration

The asterisk (*) is the dereference operator or value-at-address operator. When declaring a pointer, it signifies that the variable is a pointer to a specific type.

data_type *pointer_name;
  • Example: int *ip; // Declares ip as a pointer that can hold the address of an integer variable.

B. Initialization

A pointer is initialized by assigning it the address of a variable using the address-of operator (&).

int num
... Continue reading "Mastering C Pointers, Structures, and Unions" »

Java AWT GUI Development and OOP Inheritance

Classified in Computers

Written on in English with a size of 7.41 KB

Building Java GUI Applications with AWT

Creating GUI applications using Abstract Window Toolkit (AWT) involves setting up a top-level container, adding components, arranging them with a Layout Manager, and making the container visible.

Steps to Create an AWT Application

1. Choose a Top-Level Container

The application needs a primary window to hold all components. The most common choice is the Frame class, which provides a title bar, borders, and window controls.

import java.awt.*;

// Class extends Frame to be the application window itself
public class AWTExample extends Frame {
    // Constructor and other methods
}

2. Initialize the Container (The Frame)

Inside the constructor, you set up the basic properties of the window:

  • Title: Set the window
... Continue reading "Java AWT GUI Development and OOP Inheritance" »