1. ATM SYSTEM
Problem Summary: Create a menu to Deposit, Withdraw, Change PIN, and Check Balance . Key Logic: Use a while True loop to keep the program running until "Exit" is chosen.
# --- INITIAL SETUP ---
balance = 5000 # Starting money
pin = 1234 # Default PIN
print("--- WELCOME TO ATM ---")
while True:
# 1. Display Menu [cite: 16]
print("\n1. Deposit 2. Withdraw 3. Check Balance 4. Change PIN 5. Exit")
choice = input("Enter choice: ")
# ---...
class AVLTree {
class Node {
int key, height;
Node left, right;
Node(int key) {
this.key = key;
this.height = 1;
}
}
Node root;
int height(Node n) {
return (n == null) ? 0 : n.height;
}
int balance(Node n) {
return (n == null) ? 0 : height(n.left) - height(n.right);
}
Node rotateRight(Node y) {
Node x = y.left;
Node t = x.right;
In C language, pointers and arrays have a very close relationship, and understanding this relationship is important for memory handling and efficient programming. An array is a collection of similar data items stored in contiguous memory locations, whereas a pointer is a variable that stores the address of another variable. Because an array name represents the address of its first element, a pointer can be directly used to access and manipulate array elements.
1. Array Name as a Pointer:- In C,
In Java, multiple catch statements allow a program to handle different types of exceptions separately. When we write a try block, it may throw different exceptions while running. To handle each specific exception, Java provides multiple catch blocks, arranged one after another. Multiple catch statements mean writing more than one catch block after a single try block so that each block handles a different type of exception. This helps in writing reliable and error-free programs.
Need for Multiple
Black money
Black money refers to income or wealth that is earned through illegal means or is unreported and untaxed. In India, black money is a significant issue, often linked to corruption, tax evasion, and illicit activities. It's typically held in cash or offshore accounts to avoid detection.
*Sources of Black Money:*
- *Tax Evasion*: Unreported income or wealth, often in cash, to avoid paying taxes
- *Corruption*: Bribes, kickbacks, and other forms of corruption
- *Illicit Activities*: Income
Lexicology is the branch of linguistics that focuses on words, their structure, meanings, origins, and functions within the vocabulary system of a language. Its study is impossible without considering its deep connections with other linguistic disciplines, because words do not exist in isolation; they are simultaneously semantic, morphological, phonological, stylistic, social, and cultural units. Semantics is central to lexicology because analyzing
int count(struct node *p){
int c = 0;
while(p){
c++;
p = p->next;
}
return c;
}
🛑Explain the Various Sources of Historical Knowledge in Pre-Colonial India
Understanding pre-colonial Indian history depends on a wide range of sources that help historians reconstruct political events, social life, economy, culture, religion, and scientific achievements. Since India has one of the world’s oldest civilizations, the sources of history are rich and diverse. These sources can be broadly classified into archaeological sources and literary sources, each offering unique insights...