Q1. Working Of Increment and Decrement Operator.
Program:
#include <stdio.h>
int main() {
int a = 10;
printf("%d\n",a++); // a = a + 1 => a = 11
printf("%d\n",a--); // a = a - 1 => a = 10
int count = 5;
printf("%d\n", ++count); // prints 6 (prefix increment)
printf("%d\n", count--); // prints 6, then count becomes 5 (postfix decrement)
return 0;
Q.Tokens:A token is the smallest unit of meaning in a programming languageThe tokens would be: 1. int → keyword 2. x → identifier 3. =
What is JVM? How is it different from JRE?
JVM vs JRE (4 Marks - Point Format):
JVM (Java Virtual Machine):
It is an abstract machine that runs Java bytecode, enabling platform independence by converting bytecode into machine code.
JRE (Java Runtime Environment):
It is a software package that provides the necessary environment to run Java applications. It includes the JVM, core libraries, and other files.
Function:
JVM is responsible for execution only, whereas JRE provides everything needed
1. Fractional Knapsack Problem (Greedy Approach)
-------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
struct Item {
int weight, profit;
float ratio;
};
int compare(const void *a, const void *b) {
struct Item *i1 = (struct Item *)a;
struct Item *i2 = (struct Item *)b;
return (i2->ratio > i1->ratio) - (i2->ratio < i1->ratio);
}
void fractionalKnapsack(int n, int capacity, struct Item items[]) {
for (int i =...
Cells are open systems – they exchange both matter and energy with their environment.
Open System Examples (Cells):
In: Water, oxygen, nutrients, solar energy (in plants)
Out: Carbon dioxide, waste, thermal energy, kinetic energy
| Need | Organ System |
|---|---|
| Nutrient intake & use | Digestive |
| Gas exchange | Respiratory, circulatory |
| Movement & growth | Musculoskeletal |
| Response to stimuli | Nervous |
| Waste removal | Excretory, respiratory, digestive |
| Reproduction | Reproductive |
| Need | Organ |
|---|
Grievance Redressal System Objectives of the Grievance Redressal System: To protect the interests of policyholders. To provide a structured channel for resolving complaints. To enhance customer satisfaction and trust. To ensure compliance with IRDAI guidelines. To improve service delivery and transparency. ⚙ Key Components / Parts of the System: 1. Grievance Redressal Officer (GRO): 2. Multiple Complaint Channels: 3. Acknowledgement of Complaint: 4. Resolution Timeline: 5. Grievance Escalation
Multithreaded
• Multithreading is a Process to execute multiple threads at the same time withoutdependency of other thread called Mullltithreading .
• Java supports multithreaded programming, which allows you to write programs that do many things simultaneously.
• A multithreaded program contains two or more parts that can run concurrently.
Each part of such a program is called a thread.
• Thread is a predefined class which is available in java.lang package. Thread is a basic unit of CPU and
Sericulture is an agro-based industry. It involves rearing of silkworm moths, Bombyx mori for the production of raw silk, which is the yarn obtained out of cocoons. Sericulture plays a major role in rural employment, poverty alleviation and earning foreign exchange.
Silkworm has four stages in its life cycle: egg, caterpillar (larva), pupa and adult moth.When the worms hatched, they are called caterpillars which are food specific and eat voraciously on mulberry leaves. One important factor to silk
Concepts (Assumptions): The fundamental beliefs that underpin accounting.