Core C Language Fundamentals and Practical Programs
C Program to Find the Largest of Three Numbers
#include <stdio.h>
int main() {
int a, b, c;
printf("Enter three numbers: ");
scanf("%d %d %d", &a, &b, &c);
if (a >= b && a >= c) {
printf("%d is the largest.\n", a);
} else if (b >= a && b >= c) {
printf("%d is the largest.\n", b);
} else {
printf("%d is the largest.\n", c);
}
return 0;
}C Program to Check Positive, Negative, or Zero
#include <stdio.Read More
Computer Networking and Architecture Fundamentals
Data Transmission and Networking
What is a packet?
A packet is a small unit of data sent across a network. Large files are divided into packets so they can be transmitted more efficiently.
What is a header?
A header is part of a packet. It contains the destination address and sequencing information so the packet reaches the correct device.
What is a payload?
A payload is the part of a packet that contains the actual data being sent.
What is a trailer?
A trailer is the last part of a packet. It contains
Read MoreDigital Forensics: Image, Network, and Cloud Analysis
Digital Image Forensics
Raw Image File: An unprocessed image format from high-end cameras. It is proprietary and preserves the most complete sensor data. Demosaicing is the process of converting raw sensor data into a standard, viewable image format.
Metadata and File Structure:
- EXIF Data: Stores metadata like camera make, model, and serial number.
- File Header: The beginning portion of a file containing hexadecimal values (e.g., JPEG is FFD8).
- Bitmap Files: Store graphic information as a grid of individual
Database Transactions, ACID Properties, and Deadlocks
Transaction and ACID Properties (8 Marks)
A transaction is a sequence of database operations that performs a single logical unit of work. A transaction may consist of one or more SQL statements such as INSERT, UPDATE, DELETE, and SELECT.
A transaction must be completed entirely; otherwise, all changes made by it are cancelled.
Example: Bank Fund Transfer
- Debit ₹1000 from Account A.
- Credit ₹1000 to Account B.
Both operations together form a transaction. If one operation fails, the entire transaction
Read MoreCore Java Fundamentals: Key Concepts and Definitions
1. The Role of the JVM
The JVM (Java Virtual Machine) is an engine that provides a runtime environment to drive Java code. It converts Java bytecode into machine-specific instructions, enabling Java’s “write once, run anywhere” platform independence.
2. Primitive Data Types
Primitive data types are the most basic, built-in types in Java that hold pure, simple values rather than objects. Examples include:
- int: For integers.
- boolean: For true/false values.
3. == Operator vs. equals() Method
- ==: Compares
Essential Bash Scripting Examples for Linux Users
1. Prime Numbers
This program finds the prime numbers between two input numbers (M < N).
#!/bin/bash
echo "Program to find the prime numbers between two input numbers (M < N)"
echo
echo "Enter the value of M:"
read M
echo "Enter the value of N:"
read N
# Validate input
if [ $M -lt 2 ]
then
M=2
fi
echo "Prime numbers between $M and $N are:"
for ((num=M; num<=N; num++))
do
is_prime=1
for ((i=2; i*i<=num; i++))
do
if (( num % i == 0 ))
then
Read More
