FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Why C Requires the “struct” Keyword for Structures
NewsProgramming Languages

Why C Requires the “struct” Keyword for Structures

via Dev.toPaul J. Lucas1mo ago

Introduction Regardless of whether you’ve been programming in C for many years or have only recently started, you might wonder why structure declarations require that the struct keyword be included. For example: struct point { int x , y ; }; point p1 ; // Error: "struct" required. struct point p2 ; // OK. Obviously, struct is needed to declare a structure, but that’s not what this article is about. This article is about why, once declared, struct is still needed to use the previously declared structure type. If you omit struct , the compiler still knows what you mean , but it pedantically requires that you include the struct keyword anyway. If you’ve programmed in other languages, this requirement seems even more curious because no other language that allows you to declare “structure” (Go), “record” (Pascal), or “class” (C++, Java, Python, and many others) types requires repeating a keyword when you use the type. In other languages, such a type becomes a “first class citizen” that can

Continue reading on Dev.to

Opens in a new tab

Read Full Article
24 views

Related Articles

Your Mac Is Cluttered. Here’s How I Fixed Mine
News

Your Mac Is Cluttered. Here’s How I Fixed Mine

Medium Programming • 3d ago

What a squirrel has to do with Master’s studies.
News

What a squirrel has to do with Master’s studies.

Medium Programming • 3d ago

RHAPSODY OF REALITIES - 28TH MARCH 2026
"We’re offsprings of the Word, of the same seed that…
News

RHAPSODY OF REALITIES - 28TH MARCH 2026 "We’re offsprings of the Word, of the same seed that…

Medium Programming • 3d ago

Backward Compatibility in Go: What to Know
News

Backward Compatibility in Go: What to Know

Hackernoon • 3d ago

SteelSeries’ feature-packed Nova Pro Wireless headset is $80 off
News

SteelSeries’ feature-packed Nova Pro Wireless headset is $80 off

The Verge • 3d ago

Discover More Articles