Study Arham
Study Arham
Queue Questions
Implement the queue using an array.
—LEFT—
Star print
2d Array
Recursion
Oops questions
Dbms
Sql
C
Python
Dsa Theory
The logic for each of these tasks in C programming:
1. Addition / Subtraction / Multiplication of Numbers:
- Addition: `result = num1 + num2`
- Subtraction: `result = num1 - num2`
- Multiplication: `result = num1 * num2`
4. Swapping Numbers:
- Use a temporary variable to swap values between two variables.
5. Even/Odd Number:
- Checking if a number is even: `if (num % 2 == 0)`
13. Program to find the number of days in a given month of given years:
- Use conditionals to check the month and account for leap years for
February.
1. Fibonacci Series
- Initialize two variables for the first two numbers in the series.
- Use a loop to calculate and print the next numbers in the series by adding
the previous two.
9. Factorial:
- Calculate the factorial of a number using a loop, multiplying the number by
decreasing values from 1 to the number itself.
28. Replace Any Number with Another Number (e.g., 0 with 5):
- Iterate through a number and replace all occurrences of a specific number
with another number.
Array Questions:
1. Array Insertion:
- Insert an element into an array at a specified position by shifting elements
to accommodate the new element.
2. Array Deletion:
- Delete an element from an array at a specified position by shifting
elements to close the gap.
3. Array Updation:
- Update an element in an array at a specified position with a new value.
2. Length of String:
- Calculate the length (number of characters) of a string using a loop.
3. Reverse a String
- Reverse the characters in a string using a loop.
Other Topics:
Star Print:
- Print patterns of stars or other characters using loops.
2D Array:
- Create and manipulate 2D arrays, perform operations like matrix
multiplication, and traverse elements.
Recursion:
- Implement recursive functions for solving problems, such as factorial
calculation, Fibonacci series, and more.
Python Programming:
- Solve Python programming problems and tasks, including data structures
and algorithms.