Blog

python tutorials and learn python

Created with Sketch.

C Program to Check Whether a Character is an Alphabet or not

C Program to Check Whether a Character is an Alphabet or not In this example, you will learn to check whether a character entered by the user is an alphabet or not.   Example: Program to Check Alphabet  

C Program to Check Whether a Number is Positive or Negative

C Program to Check Whether a Number is Positive or Negative In this example, you will learn to check whether a number (entered by the user) is negative or positive.   This program takes a number from the user and checks whether that number is either positive or negative or zero. Example #1: Check if…
Read more

C Program to Check Leap Year

C Program to Check Leap Year This program checks whether a year (integer) entered by the user is a 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. Example:…
Read more

C Program to Find the Largest Number Among Three Numbers

C Program to Find the Largest Number Among Three Numbers In this example, the largest number among three numbers (entered by the user) is found using three different methods. This program uses only if statement to find the largest number. Example #1 This program uses nested if…else statement to find the largest number.

C Program to Check Whether a Character is Vowel or Consonant

C Program to Check Whether a Character is a Vowel or Consonant In this example, if…else statement is used to check whether an alphabet entered by the user is a vowel or a constant. The five alphabets A, E, I, O and U are called vowels. All other alphabets except these 5 vowel letters are…
Read more

C Program to Check Whether a Number is Even or Odd

C Program to Check Whether a Number is Even or Odd In this example, if…else statement is used to check whether a number entered by the user is even or odd. An even number is an integer that is exactly divisible by 2. Example: 0, 8, -24 An odd number is an integer that is…
Read more

C Program to Swap Two Numbers

C Program to Swap Two Numbers This example contains two different techniques to swap numbers in C programming. The first program uses a temporary variable to swap numbers, whereas the second program doesn’t use temporary variables. Example 1: Program to Swap Numbers Using Temporary Variable  

C Program to Demonstrate the Working of Keyword long

C Program to Demonstrate the Working of Keyword long The long is a size modifier, indicated by the keyword long, that may increase the size of a variable during declaration. This program will demonstrate the working of the long keywords. Example: Program to Demonstrate the Working of long