Uploaded April 2025 | Updated September 2026, 2 weeks ago
#coding #programming #cprogramming
void birthday(int* age);
int main() {
// pointer = A variable that stores the memory address of another variable.
// Benefit: They help avoid wasting memory by allowing you to pass
// the address of a large data structure instead of copying the entire data.
int age = 25;
int *pAge = &age;
birthday(pAge);
printf("You are %d years old", age);
return 0;
}
void birthday(int* age){
// pass by reference
(*age)++;
}
#coding #programming #cprogramming
void birthday(int* age);
int main() {
// pointer = A variable that stores the memory address of another variable.
// Benefit: They help avoid wasting memory by allowing you to pass
// the address of a large data structure instead of copying the entire data.
int age = 25;
int *pAge = &age;
birthday(pAge);
printf("You are %d years old", age);
return 0;
}
void birthday(int* age){
// pass by reference
(*age)++;
}
![Learn Java timertasks in 6 minutes! β²οΈ
#java #javatutorial #javacourse
import java.util.Timer;
import java.util.TimerTask;
public class Main {
public static void main(String[] args) {
// Timer = Class that schedules tasks at specific times or periodically
// Useful for: sending notifications, scheduled updates, repetitive actions
// TimerTask = Represents the task that will be executed by the Timer
// You will extend the TimerTask class to define your task
// Create a subclass of TimerTask and @Override run()
Timer timer = new Timer();
TimerTask task = new TimerTask(){
@Override
public void run(){
System.out.println(Hello!);
}
};
timer.schedule(task, 0, 1000); // (task, delay, period)
}
} Learn Java timertasks in 6 minutes! β²οΈ](https://i.ytimg.com/vi/HjzcZkzRDYs/mqdefault.jpg)

![Code a Java compound interest calculator in 7 minutes! πΈ
#java #javatutorial #javacourse
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// Compound interest calculator
Scanner scanner = new Scanner(System.in);
double principal;
double rate;
int timesCompounded;
int years;
double amount;
System.out.print(Enter the principal amount: );
principal = scanner.nextDouble();
System.out.print(Enter the interest rate (in %): );
rate = scanner.nextDouble() / 100;
System.out.print(Enter the # of times compounded per year: );
timesCompounded = scanner.nextInt();
System.out.print(Enter the # of years: );
years = scanner.nextInt();
amount = principal * Math.pow(1 + rate / timesCompounded, timesCompounded * years);
System.out.printf(The amount after %d years is $%.2f, years, amount);
scanner.close();
}
} Code a Java compound interest calculator in 7 minutes! πΈ](https://i.ytimg.com/vi/IgdIfGW-cVU/mqdefault.jpg)



![METHODS in Java are easy π
#java #javatutorial #javacourse
00:00:00 introduction
00:01:38 methods
00:03:37 arguments
00:04:37 parameters
00:08:23 return
00:10:30 example 2
00:11:10 example 3
00:12:41 example 4
public class Main {
public static void main(String[] args){
// method = a block of reusable code that is executed when called ()
happyBirthday(Spongebob, 30);
}
static void happyBirthday(String name, int age){
System.out.println(Happy Birthday to you!);
System.out.printf(Happy Birthday dear %s!n, name);
System.out.printf(You are %d years old!n, age);
System.out.println(Happy Birthday to you!n);
}
static double square(double number){
return number * number;
}
static double cube(double number){
return number * number * number;
}
static String getFullName(String first, String last){
return first + + last;
}
} METHODS in Java are easy π](https://i.ytimg.com/vi/JKecvKiNX2I/mqdefault.jpg)



![If statements are easy! π€
#coding #programming #cprogramming
00:00:00 numbers
00:06:10 booleans
00:09:08 check if string is empty
// if statement = Do some code if a condition is true.
// EXAMPLE 2
bool isStudent = true;
if(isStudent){
printf(You are a student);
}
else{
printf(You are NOT a student);
}
// EXAMPLE 3
char name[50] = ;
printf(Enter your name: );
fgets(name, sizeof(name), stdin);
name[strlen(name) - 1] = 0;
if(strlen(name) 0){
printf(You did not enter your name);
}
else{
printf(Hello %s, name);
} If statements are easy! π€](https://i.ytimg.com/vi/LFE0yibJTDk/mqdefault.jpg)