Uploaded April 2025 | Updated September 2026, 1 week ago
#coding #programming #cprogramming
typedef struct{
char name[50];
int age;
float gpa;
bool isFullTime;
}Student;
void printStudent(Student student);
int main() {
Student student1 = {"Spongebob", 30, 2.5, true};
Student student2 = {"Patrick", 36, 1.0, false};
Student student3 = {"Squidward", 48, 3.2, false};
Student student4 = {0};
strcpy(student4.name, "Sandy");
student4.age = 27;
student4.gpa = 4.0;
student4.isFullTime = true;
printStudent(student1);
printStudent(student2);
printStudent(student3);
printStudent(student4);
return 0;
}
void printStudent(Student student){
printf("Name: %s\n", student.name);
printf("Age: %d\n", student.age);
printf("GPA: %.2f\n", student.gpa);
printf("Full-time: %s\n", (student.isFullTime) ? "Yes" : "No");
printf("\n");
}
#coding #programming #cprogramming
typedef struct{
char name[50];
int age;
float gpa;
bool isFullTime;
}Student;
void printStudent(Student student);
int main() {
Student student1 = {"Spongebob", 30, 2.5, true};
Student student2 = {"Patrick", 36, 1.0, false};
Student student3 = {"Squidward", 48, 3.2, false};
Student student4 = {0};
strcpy(student4.name, "Sandy");
student4.age = 27;
student4.gpa = 4.0;
student4.isFullTime = true;
printStudent(student1);
printStudent(student2);
printStudent(student3);
printStudent(student4);
return 0;
}
void printStudent(Student student){
printf("Name: %s\n", student.name);
printf("Age: %d\n", student.age);
printf("GPA: %.2f\n", student.gpa);
printf("Full-time: %s\n", (student.isFullTime) ? "Yes" : "No");
printf("\n");
}
![How to READ FILES with Java in 8 minutes! đ
#java #javatutorial #javacourse
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class Main {
public static void main(String[] args) {
// How to read a file using Java (3 popular options)
// BufferedReader + FileReader: Best for reading text files line-by-line
// FileInputStream: Best for binary files (e.g., images, audio files)
// RandomAccessFile: Best for read/write specific portions of a large file
String filePath = C:UsersUserDesktoptest.txt;
try(BufferedReader reader = new BufferedReader(new FileReader(filePath))){
String line;
while((line = reader.readLine()) != null){
System.out.println(line);
}
}
catch(FileNotFoundException e){
System.out.println(Could not locate file);
}
catch(IOException e){
System.out.println(Something went wrong);
}
}
} How to READ FILES with Java in 8 minutes! đ](https://i.ytimg.com/vi/eHjbvgw4hsI/mqdefault.jpg)
![Read files using C programming in 6 minutes! đ
#coding #programming #cprogramming
// READ A FILE
FILE *pFile = fopen(input.txt, r);
char buffer[1024] = {0};
if(pFile NULL){
printf(Could not open filen);
return 1;
}
while(fgets(buffer, sizeof(buffer), pFile) != NULL){
printf(%s, buffer);
}
fclose(pFile);
return 0; Read files using C programming in 6 minutes! đ](https://i.ytimg.com/vi/eIlcl-mt3tg/mqdefault.jpg)
![Learn VARIABLE SCOPE in 4 minutes! đ
#java #javatutorial #javacourse
public class Main {
static int x = 3; //CLASS
public static void main(String[] args){
int x = 1; //LOCAL
System.out.println(x);
doSomething();
}
static void doSomething(){
int x = 2; //LOCAL
System.out.println(x);
}
} Learn VARIABLE SCOPE in 4 minutes! đ](https://i.ytimg.com/vi/eVCK1jlopmY/mqdefault.jpg)




![Learn Java METHOD OVERRIDING in 4 minutes! âťď¸
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args) {
// Method overriding = When a subclass provides its own
// implementation of a method that is already defined.
// Allows for code reusability and gives specific implementations.
Dog dog = new Dog();
Cat cat = new Cat();
Fish fish = new Fish();
dog.move();
cat.move();
fish.move();
}
}
public class Animal {
void move(){
System.out.println(This animal is running);
}
}
public class Dog extends Animal{
}
public class Cat extends Animal{
}
public class Fish extends Animal{
@Override
void move(){
System.out.println(This animal is swimming);
}
} Learn Java METHOD OVERRIDING in 4 minutes! âťď¸](https://i.ytimg.com/vi/hx_DRanBRRM/mqdefault.jpg)
![Code a Java temperature converter in 7 minutes! đĄď¸
#java #javatutorial #javacourse
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double temp;
double newTemp;
String unit;
System.out.print(Enter the temperature: );
temp = scanner.nextDouble();
System.out.print(Convert to Celsius or Fahrenheit? (C or F): );
unit = scanner.next().toUpperCase();
// (condition) ? true : false
newTemp = (unit.equals(C)) ? (temp - 32) * 5 / 9 : (temp * 5 / 9) + 32;
System.out.printf(%.1f°%s, newTemp, unit);
scanner.close();
}
} Code a Java temperature converter in 7 minutes! đĄď¸](https://i.ytimg.com/vi/iF9OVaBdxBQ/mqdefault.jpg)

![Learn OVERLOADED CONSTRUCTORS in 6 minutes! đ ď¸
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args) {
// overloaded constructors = Allow a class to have multiple constructors
// with different parameter lists.
// Enable objects to be initialized in various ways.
User user1 = new User(Spongebob);
User user2 = new User(Patrick, PStar@aol.com);
User user3 = new User(Sandy, SCheeks@gmail.com, 27);
User user4 = new User();
System.out.println(user1.username);
System.out.println(user1.email);
System.out.println(user1.age);
System.out.println(user2.username);
System.out.println(user2.email);
System.out.println(user2.age);
System.out.println(user3.username);
System.out.println(user3.email);
System.out.println(user3.age);
System.out.println(user4.username);
System.out.println(user4.email);
System.out.println(user4.age);
}
}
public class User {
String username;
String email;
int age;
User(){
this.username = Guest;
this.email = Not provided;
this.age = 0;
}
User(String username){
this.username = username;
this.email = Not provided;
this.age = 0;
}
User(String username, String email){
this.username = username;
this.email = email;
this.age = 0;
}
User(String username, String email, int age){
this.username = username;
this.email = email;
this.age = age;
}
} Learn OVERLOADED CONSTRUCTORS in 6 minutes! đ ď¸](https://i.ytimg.com/vi/iLrY412dFwo/mqdefault.jpg)