Structs in C are easy! 📦

Bro Code April 9, 2025
Video Thumbnail
Bro Code Logo

Bro Code

@brocodez

About

Coding bootcamps HATE HIM! 🗿

Video Description

#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"); }

Essential Coding Tools

AI-recommended products based on this video

Loading...
New Slim 65W USB C Laptop Charger for Lenovo ThinkPad Yoga 7i 7 9i 9 2-in-1 Yoga Book 9i Gen 10 ThinkBook 16 15 14 Gen 8/7 13s 13x 14s IdeaPad Slim/Pro 5X 5i 5 3X 3i 3 2-in-1 Type C Power Cord

New Slim 65W USB C Laptop Charger for Lenovo ThinkPad Yoga 7i 7 9i 9 2-in-1 Yoga Book 9i Gen 10 ThinkBook 16 15 14 Gen 8/7 13s 13x 14s IdeaPad Slim/Pro 5X 5i 5 3X 3i 3 2-in-1 Type C Power Cord

(13)
$24.99
FREE delivery Sat, Jun 21 on your first order
Loading...
135W USB C AC Adapter Charger for Lenovo ThinkPad Z16 P16s P15s P14s E16 E15 E14 T16 Yoga/Slim Pro 9 7 6 7i 9i Book 9 ThinkBook 16 14p 14 15 14s IdeaPad Slim/Pro 9 7 5 Legion 9 Laptop ADL135YSDC3A

135W USB C AC Adapter Charger for Lenovo ThinkPad Z16 P16s P15s P14s E16 E15 E14 T16 Yoga/Slim Pro 9 7 6 7i 9i Book 9 ThinkBook 16 14p 14 15 14s IdeaPad Slim/Pro 9 7 5 Legion 9 Laptop ADL135YSDC3A

(1)
$59.99
FREE delivery Sun, Jun 22
Loading...
140W C to Magnetic 3 Charger, Compatible with MacBook Air 13, 15 Inch/Mac Book Pro 14, 16 Inch, M1/M2/M3/M4 from 2021/2022/2023/2024/2025 Models, 6.6FT【Original Quality】

140W C to Magnetic 3 Charger, Compatible with MacBook Air 13, 15 Inch/Mac Book Pro 14, 16 Inch, M1/M2/M3/M4 from 2021/2022/2023/2024/2025 Models, 6.6FT【Original Quality】

(71)
$49.99
PrimeFREE delivery Sat, Jun 14
200+ bought in past month
Loading...
MSI MAG MT201D - Premium Heavy Duty Dual Monitor Stand Arms, 17-45" Support, VESA Compatible, Adjustable Spring Mount, 44 lbs per Screen, Clamp & Grommet, Quick Release Plate - Black

MSI MAG MT201D - Premium Heavy Duty Dual Monitor Stand Arms, 17-45" Support, VESA Compatible, Adjustable Spring Mount, 44 lbs per Screen, Clamp & Grommet, Quick Release Plate - Black

(168)
$124.99
FREE delivery Wed, Jan 14
50+ bought in past month
Loading...
Mind Reader Monitor Stand, Height Adjustable, Ventilated Laptop Riser, Office, Metal, 36.8L x 23.5W x 14H cm, Black

Mind Reader Monitor Stand, Height Adjustable, Ventilated Laptop Riser, Office, Metal, 36.8L x 23.5W x 14H cm, Black

(95)
$46.30$46.13
FREE delivery Mon, Aug 11
Loading...
Seventable L Shaped Computer Desk with Drawers 47.2 inch,Gaming Desk with Power Outlets & LED Lights,Reversible Office Desk with Storage Shelves,Corner Desk with Monitor Stand for Home Office White

Seventable L Shaped Computer Desk with Drawers 47.2 inch,Gaming Desk with Power Outlets & LED Lights,Reversible Office Desk with Storage Shelves,Corner Desk with Monitor Stand for Home Office White

(597)
$129.99
FREE delivery Thu, Jun 26
50+ bought in past month
Loading...
Seventable L Shaped Computer Desk with Power Outlets & LED Lights, 44.6"Small Home Office Desk with 3 Fabric Drawers, Reversible Gaming Desk with Storage Shelves, Corner Desk with Monitor Stand, White

Seventable L Shaped Computer Desk with Power Outlets & LED Lights, 44.6"Small Home Office Desk with 3 Fabric Drawers, Reversible Gaming Desk with Storage Shelves, Corner Desk with Monitor Stand, White

(100)
$119.99
FREE delivery Thu, Jun 26