Programming Languages Archive

Error handling in C programs using errno and perror

The perror() function produces a message on standard error describing the last error encountered during a call to a system or library function. When a system call fails, it usually returns -1 and sets the variable errno to a value describing what went wrong....Read More

How to use static arrays in go language

The below program initialises a static array of 7 elements and prints the values of each element using for loop, this this program demonstrates how to initialise a static array and also how to use a for loop in go language. $ vim static_array_example.go...Read More