LinuxProgramming.com: SourceLib: Two New Code Samples Are Available | Linux Today

LinuxProgramming.com: SourceLib: Two New Code Samples Are Available

Written By
Web Webster
Web Webster
Jan 24, 2001

Two new code samples have been added to SourceLib:

Name: random3
Category: Basics
Purpose: Use random numbers from the rand()
function to generate random integers in a specified range.
Keywords: C stdlib.h time.h srand rand

Name: gcc_struct_packing
Category: Misc
Purpose: Packing fields in structures on specific
boundaries, including single bytes, i.e. with no internal
padding.
Keywords: C stdlib.h struct aligned attribute
packed

If you’d like to learn more about SourceLib or contribute to it,
see the following resources:

The original
announcement and overview


Submission guidelines

Suggested
topics list

If you’d like to send us some suggestions or comments about
SourceLib (or anything else on LinuxProgramming.com, for that
matter), please feel free to e-mail me directly at the address
below.

Take care,
Lou Grinzo
Editor, LinuxProgramming.com
lgrinzo@internet.com

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.