Skip to content

Commit

Permalink
Freshers' C Class 4 content added
Browse files Browse the repository at this point in the history
  • Loading branch information
nisiddharth committed Jan 30, 2022
1 parent 3d7994f commit 1f1ad33
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Freshers/C/2022_01_29_CClass-3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ January 29th, 2022

<hr>

## Tasks:
## Tasks

### Offline:
### Offline

1. Write a program (WAP) to accept a number from user and display it is a Negative number or positive number or zero.
2. WAP to accept a number from user and check if it is a multiple of 8 or not.
Expand All @@ -27,6 +27,7 @@ January 29th, 2022

*Where gross salary = basic salary + HRA + DA.*
7. WAP to accept basic salary of a person. Calculate and display income tax to pay as per given criteria:

| Annual Salary | Income tax |
| ------------- | ---------- |
| <= ₹2,50,000 | 0 |
Expand All @@ -42,14 +43,8 @@ January 29th, 2022
* PF (provident fund) = 10% of basic salary
* INS (insurance) = 12% of basic salary</i>

### On HackerRank:
### On HackerRank

1. [Sum and Difference of Two Numbers](https://www.hackerrank.com/challenges/sum-numbers-c/problem?isFullScreen=true)
2. [Playing with Characters](https://www.hackerrank.com/challenges/playing-with-characters/problem?isFullScreen=true)
3. [Conditional Statements in C](https://www.hackerrank.com/challenges/conditional-statements-in-c/problem?isFullScreen=true)

---

_Good luck!_

**Note:** Tomorrow's class timing is unusual, please be available at 3pm.
Binary file not shown.
54 changes: 54 additions & 0 deletions Freshers/C/2022_01_30_CClass-4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# C Class 4

## Class recording: [Here](https://drive.google.com/file/d/1lkecY1mCdsprEkdE5mJNpRUkZAetPmny/view?usp=sharing)
## PPT: [Here](CC_FirstYe_Class4.pdf)

January 30th, 2022

<div align="center"><img src="../C_logo.png" alt="C language logo" height=150/></div>

<hr>

## Tasks

### Offline

#### Switch-case

0. First finish [last day's tasks](../2022_01_29_CClass-3/README.md#Tasks).
1. WAP to accept a number from 1 to 7 and display the corresponding day of the week.
2. WAP to accept two numbers and a operator (+, -, *, /) from user and perform the operation on the two numbers as per the operator entered and display the result.
3. Write a menu driven program to accept a choice from user and as per the choice perform the following operations:
- Area of a circle
- Area of a rectangle
- Area of a triangle (Heron's formula)
- Volume of a sphere
- Exit
4. WAP to acept an alphabet from user and display whether it is a vowel or consonant.

#### Loops

1. WAP to display all **even** numbers from 1 to 100.
2. WAP to display all **odd** numbers between two number entered by user.
3. WAP to accept a number from user and display the **factorial** of that number.
4. WAP to accept a number frm user and display it's **multiplication table**.
5. WAP to accept a number from user and display the **number of digits** in that number.
6. WAP to accept a number from user and display the **sum of digits** in that number.
7. WAP to accept a number from user and display the **product of digits** in that number.
8. WAP to accept a number from user and display the **reverse** of that number.
9. WAP to accept a number from user and display whether it is a **palindrome** or not.
10. WAP to accept a number from user and display whether it is a **prime number** or not.
11. WAP to display all **prime numbers** between 1 to 100.
12. WAP to accept two numbers from user and display the **greatest common divisor (GCD)** (or the highest common factor (HCF)) of those two numbers.
13. WAP to accept two numbers from user and display the **lowest common multiple (LCM)** of those two numbers.

### HackerRank:

1. [For Loop in C](https://www.hackerrank.com/challenges/for-loop-in-c/problem?isFullScreen=true)
2. [Sum of Digits of a Five Digit Number](https://www.hackerrank.com/challenges/sum-of-digits-of-a-five-digit-number/problem?isFullScreen=true)
4. **Read and do [Bitwise Operators](https://www.hackerrank.com/challenges/bitwise-operators-in-c/problem?isFullScreen=true)**.

### Quizzes

1. [If Else Statement Quiz in C](https://www.knowprogram.com/c-quiz/if-else-statement-quiz-c/)
2. [Quiz on Increment and Decrement Operators in C](https://www.knowprogram.com/c-quiz/increment-decrement-quiz-c/)
6 changes: 6 additions & 0 deletions Freshers/C/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@
- [Class 1: held on January 22, 2022](2022_01_22_CClass-1)
- [Class 2: held on January 23, 2022](2022_01_23_CClass-2)
- [Class 3: held on January 29, 2022](2022_01_29_CClass-3)
- [Class 4: held on January 30, 2022](2022_01_30_CClass-4)


## Reading material

- Book: **C in Depth** by S.K.Srivastava/Deepali Srivastava, preferably buy it. We gave you PDF link in class.
1 change: 1 addition & 0 deletions Freshers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
- [C Class 1](C/2022_01_22_CClass-1)
- [C Class 2](C/2022_01_23_CClass-2)
- [C Class 3](C/2022_01_29_CClass-3)
- [C Class 4](C/2022_01_30_CClass-4)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ If you are a part of MNNIT join us on Microsoft Team [MNNIT CC Queries Official]
- [C Class-1](Freshers/C/2022_01_22_CClass-1)
- [C Class-2](Freshers/C/2022_01_23_CClass-2)
- [C Class-3](Freshers/C/2022_01_29_CClass-3)
- [C Class-4](Freshers/C/2022_01_30_CClass-4)

- [Git/GitHub classes](Git-GitHub)
- [Git Class-1](Git-GitHub/2021_04_20_GitClass-1)
Expand Down

0 comments on commit 1f1ad33

Please sign in to comment.