Search

Life and Code

by Aditi Barbhai

Tag

csc209

How to find the length of an array in C

array

I think this is one of the most common questions that I see when I look through stackoverflow’s C section (and one that I myself struggled with after I first started learning C). C is not like Java. There are no dedicated functions to calculate the length of an array. You can’t even declare an array without first specifying the length (so C can allocate the appropriate amount of memory on the stack).

Anyway, but back to the question at hand: How do you find the length of an array in C? Continue reading “How to find the length of an array in C”

(tutorial) Getting started with shell scripting!

So, I’m back to school this semester (part time for now) and one of the first things we’re doing in our class is Shell Scripting. As a girl who got into this whole “computer science thing” after playing around with several Linux distros and loving the terminal, this is very fun for me! The course’s focus is mainly UNIX and C, but this is how we’re getting introduced to the terminal and I have no qualms. Shell scripting is almost like a game, and fairly is easy to pick up, even for someone who has little to no knowledge of the shell/terminal. So here’s a little script to get you started!

Continue reading “(tutorial) Getting started with shell scripting!”

Blog at WordPress.com.

Up ↑