C Program to Find First and Last Digit of a Number

Опубликовано: 20 Март 2026
на канале: MRTMentor
110
5

Hello and Welcome to C Programming Language.

In this video, we will learn how to find the first and the last digit of a number using C Programming language.

We will use following approaches to find the first and last digit of a number

1.we have declared three int data type variables named num, firstDigit and lastDigit.
2.The user is asked to enter a positive number. This number gets stored in the num named variable.
3.We find the last digit of the entered number with the help of (%) Modulus operator. When the entered number is divided by 10, then it returns the remainder which is the last digit of a number.

I hope after going through this video, you understand how to find the first and the last digit of a number using C

If you have any question, then comment in comment section.

Practices : Calculate Potential Energy

Thank You For Watching...

Join Telegram Channel
Source Code : https://t.me/mrtmentor

C Program to Find First and Last Digit of a Number
Find first and last digits of a number
How do you find the first digit and the last digit of a number
How do I find the first and last digit of a number in C
How do you print the first digit and last number of a number
How do you print the first and last digit
Write C program to find first and last digit of any number
C program to find first and last digit of any number