C Program to check Leap Year (2 ways)

This program checks whether the input year is leap year or not. A leap year is exactly divisible by 4 except for century years (years ending with 00). The century year is a leap year only if it is perfectly divisible by 400. Leap Year : If a year is divisible by 4, 100 and 400 then it… Read More »

Scope Rules in C

The scope of a variable x is the region of the program in which uses of x refers to its declaration. In C, all identifiers are lexically(or statically) scoped. Scoping in C is generally divided into two classes: Static Scoping, and Dynamic scoping. Static Scoping : Static scoping is also called lexical scoping. Static scope refers to the… Read More »

Strings in C

In this article, you’ll learn about strings in C programming. Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\0’. Example : char name[] = “first name” ; Declaration of strings : When the compiler encounters a sequence of characters enclosed… Read More »